From 245d0dfd967062931535ea3391900884d2875fc7 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sun, 23 Aug 2026 22:38:48 +0200 Subject: [PATCH] Enhance Azure example configurations: add subscription_id and tenant_id variables, update terraform.tfvars.example, and refine .gitignore for tfplan files --- .gitignore | 1 + examples/azure/providers.tf | 3 +++ examples/azure/terraform.tfvars.example | 1 + examples/azure/variables.tf | 11 +++++++++++ 4 files changed, 16 insertions(+) diff --git a/.gitignore b/.gitignore index 8a03275..1e99881 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ __pycache__ .vscode tmp .terraform* +*tfplan* *.tfstate *.tfstate.* *.auto.tfvars diff --git a/examples/azure/providers.tf b/examples/azure/providers.tf index ab91b24..e06e85c 100644 --- a/examples/azure/providers.tf +++ b/examples/azure/providers.tf @@ -1,3 +1,6 @@ provider "azurerm" { features {} + + subscription_id = var.subscription_id + tenant_id = var.tenant_id != "" ? var.tenant_id : null } diff --git a/examples/azure/terraform.tfvars.example b/examples/azure/terraform.tfvars.example index 6934a19..2371855 100644 --- a/examples/azure/terraform.tfvars.example +++ b/examples/azure/terraform.tfvars.example @@ -2,6 +2,7 @@ # Keep secrets - psk here - out of any tracked file: set them with # TF_VAR_psk or in a git-ignored *.auto.tfvars instead. +subscription_id = "00000000-0000-0000-0000-000000000000" location = "westeurope" name = "vpn-router-example" admin_ssh_public_key = "ssh-ed25519 AAAA... you@example.com" diff --git a/examples/azure/variables.tf b/examples/azure/variables.tf index 661a67c..10d9c91 100644 --- a/examples/azure/variables.tf +++ b/examples/azure/variables.tf @@ -1,3 +1,14 @@ +variable "subscription_id" { + description = "Azure subscription ID to deploy into." + type = string +} + +variable "tenant_id" { + description = "Azure AD tenant ID. Leave empty to use the tenant of the credentials Terraform is running with." + type = string + default = "" +} + variable "location" { description = "Azure region to deploy into." type = string