Skip to content

Commit 7355458

Browse files
committed
fix: fixed recreation of resources because of index key
1 parent bf86778 commit 7355458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/frontend/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ locals {
4545

4646
resource "google_compute_subnetwork" "proxy_only" {
4747
for_each = {
48-
for index, config in var.internal_forwarding_rules_config : index => config
48+
for index, config in var.internal_forwarding_rules_config : config.region => config
4949
if config.create_proxy_only_subnet == true
5050
}
5151

52-
name = "${var.name}-proxy-only-subnet-${each.value.region}"
52+
name = "${var.name}-proxy-only-subnet-${each.key}"
5353
ip_cidr_range = each.value.proxy_only_subnet_ip
5454
network = var.network
5555
purpose = "GLOBAL_MANAGED_PROXY"

0 commit comments

Comments
 (0)