Set Azure subscription ID when applying Terraform files

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2024-08-27 13:17:45 +02:00 committed by Daniel Weiße
parent b4b5c5e32d
commit 861b541c52
27 changed files with 104 additions and 10 deletions

View file

@ -13,6 +13,10 @@ terraform {
provider "azurerm" {
features {}
subscription_id = var.subscription_id
# This enables all resource providers.
# In the future, we might want to use `resource_providers_to_register` to registers just the ones we need.
resource_provider_registrations = "all"
}
locals {
@ -103,7 +107,7 @@ resource "azurerm_route_table" "route_table" {
name = "vpn-routes"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
disable_bgp_route_propagation = false
bgp_route_propagation_enabled = false
dynamic "route" {
for_each = var.remote_ts

View file

@ -1,3 +1,9 @@
variable "subscription_id" {
type = string
description = "Azure subscription ID. This can also be sourced from the ARM_SUBSCRIPTION_ID environment variable: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#subscription_id"
default = ""
}
variable "resource_group_location" {
type = string
default = "westeurope"