Skip to content

Commit 4274009

Browse files
committed
fix: adjusting keys to prevent breaking change
1 parent 439f7d9 commit 4274009

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

locals.firewall.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ locals {
3030
for pair in flatten([
3131
for vnet_name, vnet in var.hub_virtual_networks : [
3232
for i in range(vnet.firewall.public_ip_count) : {
33-
key = "${vnet_name}-${i}"
33+
key = "${vnet_name}${i == 0 ? "" : "-${i}"}"
3434
vnet = vnet
3535
index = i
3636
vnet_name = vnet_name

main.firewall.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module "hub_firewalls" {
1111
enable_telemetry = var.enable_telemetry
1212
firewall_ip_configuration = concat([{
1313
name = each.value.default_ip_configuration.name
14-
public_ip_address_id = module.fw_default_ips["${each.key}-1"].public_ip_id
14+
public_ip_address_id = module.fw_default_ips[each.key].public_ip_id
1515
subnet_id = module.hub_virtual_network_subnets["${each.key}-${local.firewall_subnet_name}"].resource_id
1616
}], [
1717
for i in range(1, each.value.public_ip_count) : {

0 commit comments

Comments
 (0)