diff --git a/templates/complete_multi_region/locals-config.tf b/templates/complete_multi_region/locals-config.tf index df121d29..82daab9c 100644 --- a/templates/complete_multi_region/locals-config.tf +++ b/templates/complete_multi_region/locals-config.tf @@ -1,6 +1,6 @@ locals { config_file_extension = replace(lower(element(local.config_file_split, length(local.config_file_split) - 1)), local.const_yml, local.const_yaml) - config_file_name = basename(var.configuration_file_path) + config_file_name = var.configuration_file_path == "" ? "config-hub-and-spoke-vnet.yaml" : basename(var.configuration_file_path) config_file_split = split(".", local.config_file_name) const_yaml = "yaml" const_yml = "yml" diff --git a/templates/complete_multi_region/locals-private-dns.tf b/templates/complete_multi_region/locals-private-dns.tf index b3503f90..e0490200 100644 --- a/templates/complete_multi_region/locals-private-dns.tf +++ b/templates/complete_multi_region/locals-private-dns.tf @@ -1,6 +1,6 @@ locals { private_dns_virtual_networks_hub_and_spoke_vnet = (local.hub_networking_enabled ? - { for key, value in try(module.hub_and_spoke_vnet[0].virtual_networks, {}) : key => { vnet_resource_id = value.id } } : + { for key, value in try(local.module_hub_and_spoke_vnet.hub_virtual_networks, {}) : key => { vnet_resource_id = module.hub_and_spoke_vnet[0].virtual_networks[key].id } } : {} ) private_dns_virtual_networks_virtual_wan = (local.virtual_wan_enabled ?