From 9966bf263968ce80bf156ae88d5a3a0961af9fd9 Mon Sep 17 00:00:00 2001 From: David Szabo <38033309+daszabo@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:59:22 +0200 Subject: [PATCH] Azurerm requires subscription ID to be provided explicitly (#49) --- azure/main.tf | 2 +- azure/variables.tf | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/azure/main.tf b/azure/main.tf index 8d89d9b..905989b 100644 --- a/azure/main.tf +++ b/azure/main.tf @@ -93,7 +93,7 @@ module "cdp_deploy" { datalake_async_creation = var.datalake_async_creation # From pre-reqs module output - azure_subscription_id = module.cdp_azure_prereqs.azure_subscription_id + azure_subscription_id = var.azure_subscription_id == null ? module.cdp_azure_prereqs.azure_subscription_id : var.azure_subscription_id azure_tenant_id = module.cdp_azure_prereqs.azure_tenant_id azure_resource_group_name = module.cdp_azure_prereqs.azure_resource_group_name diff --git a/azure/variables.tf b/azure/variables.tf index 5004e9c..ca3824c 100644 --- a/azure/variables.tf +++ b/azure/variables.tf @@ -113,6 +113,14 @@ variable "enable_raz" { default = true } +variable "azure_subscription_id" { + type = string + + description = "The subscription where the environment should be deployed to" + + default = null +} + # ------- Network Resources ------- variable "ingress_extra_cidrs_and_ports" { type = object({