From 13ef38023e6f0c8a8c33492eab87c0f08e4f8e49 Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Mon, 19 Feb 2024 22:17:59 +0100 Subject: [PATCH 1/2] Fix #2095 for regional load balancers --- modules/net-lb-app-ext-regional/urlmap.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/net-lb-app-ext-regional/urlmap.tf b/modules/net-lb-app-ext-regional/urlmap.tf index 2cc7abdede..e305918d08 100644 --- a/modules/net-lb-app-ext-regional/urlmap.tf +++ b/modules/net-lb-app-ext-regional/urlmap.tf @@ -432,7 +432,7 @@ resource "google_compute_region_url_map" "default" { } } dynamic "route_rules" { - for_each = toset(coalesce(m.value.route_rules, [])) + for_each = coalesce(m.value.route_rules, []) content { priority = route_rules.value.priority service = route_rules.value.service == null ? null : lookup( From b3268919738ac8986a52c719f6c210ba7ed6be68 Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Mon, 19 Feb 2024 22:22:54 +0100 Subject: [PATCH 2/2] ...and other load balancer types too --- modules/net-lb-app-int-cross-region/urlmap.tf | 2 +- modules/net-lb-app-int/urlmap.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/net-lb-app-int-cross-region/urlmap.tf b/modules/net-lb-app-int-cross-region/urlmap.tf index 93c4e14d5f..753fcc6131 100644 --- a/modules/net-lb-app-int-cross-region/urlmap.tf +++ b/modules/net-lb-app-int-cross-region/urlmap.tf @@ -271,7 +271,7 @@ resource "google_compute_url_map" "default" { } } dynamic "route_rules" { - for_each = toset(coalesce(m.value.route_rules, [])) + for_each = coalesce(m.value.route_rules, []) content { priority = route_rules.value.priority service = route_rules.value.service == null ? null : lookup( diff --git a/modules/net-lb-app-int/urlmap.tf b/modules/net-lb-app-int/urlmap.tf index 21f7e59723..3fd01270be 100644 --- a/modules/net-lb-app-int/urlmap.tf +++ b/modules/net-lb-app-int/urlmap.tf @@ -272,7 +272,7 @@ resource "google_compute_region_url_map" "default" { } } dynamic "route_rules" { - for_each = toset(coalesce(m.value.route_rules, [])) + for_each = coalesce(m.value.route_rules, []) content { priority = route_rules.value.priority service = route_rules.value.service == null ? null : lookup(