Enhance Azure example configurations: add subscription_id and tenant_id variables, update terraform.tfvars.example, and refine .gitignore for tfplan files

This commit is contained in:
2026-08-23 22:38:48 +02:00
parent dac5cea5ee
commit 245d0dfd96
4 changed files with 16 additions and 0 deletions
+1
View File
@@ -8,6 +8,7 @@ __pycache__
.vscode .vscode
tmp tmp
.terraform* .terraform*
*tfplan*
*.tfstate *.tfstate
*.tfstate.* *.tfstate.*
*.auto.tfvars *.auto.tfvars
+3
View File
@@ -1,3 +1,6 @@
provider "azurerm" { provider "azurerm" {
features {} features {}
subscription_id = var.subscription_id
tenant_id = var.tenant_id != "" ? var.tenant_id : null
} }
+1
View File
@@ -2,6 +2,7 @@
# Keep secrets - psk here - out of any tracked file: set them with # Keep secrets - psk here - out of any tracked file: set them with
# TF_VAR_psk or in a git-ignored *.auto.tfvars instead. # TF_VAR_psk or in a git-ignored *.auto.tfvars instead.
subscription_id = "00000000-0000-0000-0000-000000000000"
location = "westeurope" location = "westeurope"
name = "vpn-router-example" name = "vpn-router-example"
admin_ssh_public_key = "ssh-ed25519 AAAA... you@example.com" admin_ssh_public_key = "ssh-ed25519 AAAA... you@example.com"
+11
View File
@@ -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" { variable "location" {
description = "Azure region to deploy into." description = "Azure region to deploy into."
type = string type = string