Skip to content

Commit

Permalink
Fix variable name to match latest ALZ PS module mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredfholgate committed Jul 22, 2024
1 parent fd71bde commit e573ec4
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion templates/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/basic/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "default_location" {
variable "starter_location" {
type = string
description = "The location for Azure resources. (e.g 'uksouth')|1|azure_location"
}
Expand Down
2 changes: 1 addition & 1 deletion templates/complete/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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, {})
Expand Down
2 changes: 1 addition & 1 deletion templates/complete/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "default_location" {
variable "starter_location" {
type = string
description = "The location for Azure resources. (e.g 'uksouth')|1|azure_location"
}
Expand Down
14 changes: 7 additions & 7 deletions templates/hubnetworking/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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}"
}
}
}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/hubnetworking/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "default_location" {
variable "starter_location" {
description = "The location for Azure resources. (e.g 'uksouth')|1|azure_location"
type = string
}
Expand Down
12 changes: 6 additions & 6 deletions templates/test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
}
Expand All @@ -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 = {}
}
Expand All @@ -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 = {}
}
Expand Down
2 changes: 1 addition & 1 deletion templates/test/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e573ec4

Please sign in to comment.