diff --git a/templates/basic/main.tf b/templates/basic/main.tf index de2abd6a..589b6ca3 100644 --- a/templates/basic/main.tf +++ b/templates/basic/main.tf @@ -4,7 +4,7 @@ module "enterprise_scale" { disable_telemetry = true - default_location = var.default_location + default_location = var.starter_location root_parent_id = var.root_parent_management_group_id == "" ? data.azurerm_client_config.current.tenant_id : var.root_parent_management_group_id deploy_corp_landing_zones = true diff --git a/templates/basic/variables.tf b/templates/basic/variables.tf index fd4bd58c..6d2b2134 100644 --- a/templates/basic/variables.tf +++ b/templates/basic/variables.tf @@ -1,4 +1,4 @@ -variable "default_location" { +variable "starter_location" { type = string description = "The location for Azure resources. (e.g 'uksouth')|1|azure_location" } diff --git a/templates/complete/locals.tf b/templates/complete/locals.tf index 57adda76..dc053112 100644 --- a/templates/complete/locals.tf +++ b/templates/complete/locals.tf @@ -11,7 +11,7 @@ locals { jsondecode(templatefile("${path.module}/${local.config_file_name}", local.config_template_file_variables)) ) config_template_file_variables = { - default_location = var.default_location + default_location = var.starter_location default_postfix = var.default_postfix root_parent_management_group_id = var.root_parent_management_group_id == "" ? data.azurerm_client_config.core.tenant_id : var.root_parent_management_group_id subscription_id_connectivity = var.subscription_id_connectivity diff --git a/templates/complete/main.tf b/templates/complete/main.tf index 54f73891..0cf24902 100644 --- a/templates/complete/main.tf +++ b/templates/complete/main.tf @@ -5,7 +5,7 @@ module "enterprise_scale" { count = length(local.archetypes) > 0 ? 1 : 0 disable_telemetry = try(local.archetypes.disable_telemetry, true) - default_location = try(local.archetypes.default_location, var.default_location) + default_location = try(local.archetypes.default_location, var.starter_location) root_parent_id = try(local.archetypes.root_parent_id, data.azurerm_client_config.core.tenant_id) archetype_config_overrides = try(local.archetypes.archetype_config_overrides, {}) configure_connectivity_resources = try(local.archetypes.configure_connectivity_resources, {}) diff --git a/templates/complete/variables.tf b/templates/complete/variables.tf index e8059e42..6cd36744 100644 --- a/templates/complete/variables.tf +++ b/templates/complete/variables.tf @@ -1,4 +1,4 @@ -variable "default_location" { +variable "starter_location" { type = string description = "The location for Azure resources. (e.g 'uksouth')|1|azure_location" } diff --git a/templates/hubnetworking/main.tf b/templates/hubnetworking/main.tf index d37508ea..0e7c559e 100644 --- a/templates/hubnetworking/main.tf +++ b/templates/hubnetworking/main.tf @@ -4,7 +4,7 @@ module "enterprise_scale" { disable_telemetry = true - default_location = var.default_location + default_location = var.starter_location root_parent_id = var.root_parent_management_group_id == "" ? data.azurerm_client_config.current.tenant_id : var.root_parent_management_group_id deploy_corp_landing_zones = true @@ -29,10 +29,10 @@ module "hubnetworking" { hub_virtual_networks = { primary-hub = { - name = "vnet-hub-${var.default_location}" + name = "vnet-hub-${var.starter_location}" address_space = [var.hub_virtual_network_address_prefix] - location = var.default_location - resource_group_name = "rg-connectivity-${var.default_location}" + location = var.starter_location + resource_group_name = "rg-connectivity-${var.starter_location}" firewall = { subnet_address_prefix = var.firewall_subnet_address_prefix sku_tier = "Standard" @@ -41,7 +41,7 @@ module "hubnetworking" { default_ip_configuration = { public_ip_config = { zones = ["1", "2", "3"] - name = "pip-hub-${var.default_location}" + name = "pip-hub-${var.starter_location}" } } } @@ -63,8 +63,8 @@ module "virtual_network_gateway" { count = var.virtual_network_gateway_creation_enabled ? 1 : 0 - location = var.default_location - name = "vgw-hub-${var.default_location}" + location = var.starter_location + name = "vgw-hub-${var.starter_location}" subnet_address_prefix = var.gateway_subnet_address_prefix enable_telemetry = false virtual_network_id = module.hubnetworking.virtual_networks["primary-hub"].name diff --git a/templates/hubnetworking/variables.tf b/templates/hubnetworking/variables.tf index 29e7ed10..afd2d776 100644 --- a/templates/hubnetworking/variables.tf +++ b/templates/hubnetworking/variables.tf @@ -1,4 +1,4 @@ -variable "default_location" { +variable "starter_location" { description = "The location for Azure resources. (e.g 'uksouth')|1|azure_location" type = string } diff --git a/templates/test/main.tf b/templates/test/main.tf index e9eb7ed8..4f613f9c 100644 --- a/templates/test/main.tf +++ b/templates/test/main.tf @@ -21,26 +21,26 @@ resource "azurerm_management_group" "example_child" { resource "azurerm_resource_group" "management" { provider = azurerm.management name = "e2e-test-management-azurerm-${random_string.example.result}" - location = var.resource_group_location + location = var.starter_location } resource "azurerm_resource_group" "connectivity" { provider = azurerm.connectivity name = "e2e-test-connectivity-azurerm-${random_string.example.result}" - location = var.resource_group_location + location = var.starter_location } resource "azurerm_resource_group" "identity" { provider = azurerm.identity name = "e2e-test-identity-azurerm-${random_string.example.result}" - location = var.resource_group_location + location = var.starter_location } resource "azapi_resource" "resource_group_management" { parent_id = "/subscriptions/${var.subscription_id_management}" type = "Microsoft.Resources/resourceGroups@2021-04-01" name = "e2e-test-management-azapi-${random_string.example.result}" - location = var.resource_group_location + location = var.starter_location body = { properties = {} } @@ -51,7 +51,7 @@ resource "azapi_resource" "resource_group_connectivity" { parent_id = "/subscriptions/${var.subscription_id_connectivity}" type = "Microsoft.Resources/resourceGroups@2021-04-01" name = "e2e-test-connectivity-azapi-${random_string.example.result}" - location = var.resource_group_location + location = var.starter_location body = { properties = {} } @@ -62,7 +62,7 @@ resource "azapi_resource" "resource_group_identity" { parent_id = "/subscriptions/${var.subscription_id_identity}" type = "Microsoft.Resources/resourceGroups@2021-04-01" name = "e2e-test-identity-azapi-${random_string.example.result}" - location = var.resource_group_location + location = var.starter_location body = { properties = {} } diff --git a/templates/test/variables.tf b/templates/test/variables.tf index d13a1a9a..a826002b 100644 --- a/templates/test/variables.tf +++ b/templates/test/variables.tf @@ -25,7 +25,7 @@ variable "child_management_group_display_name" { default = "E2E Test" } -variable "resource_group_location" { +variable "starter_location" { type = string description = "This is the fourth test variable|6|azure_location" default = "uksouth"