From 01e34c3939af37bf69ed3469d73e0fbf1ed24fec Mon Sep 17 00:00:00 2001 From: Sergio Rodriguez <2318521+rodriguezsergio@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:18:03 -0500 Subject: [PATCH] standardize on "group" key --- blueprints/apigee/apigee-x-foundations/northbound.tf | 2 +- blueprints/apigee/bigquery-analytics/main.tf | 2 +- .../apigee_nb.tf | 2 +- blueprints/cloud-operations/adfs/main.tf | 2 +- blueprints/networking/glb-and-armor/main.tf | 4 ++-- blueprints/networking/glb-hybrid-neg-internal/glb.tf | 4 ++-- blueprints/networking/psc-glb-and-armor/consumer.tf | 4 ++-- blueprints/serverless/cloud-run-explore/main.tf | 2 +- blueprints/third-party-solutions/phpipam/glb.tf | 2 +- modules/net-lb-app-ext-regional/README.md | 8 ++++---- modules/net-lb-app-ext-regional/backend-service.tf | 2 +- modules/net-lb-app-ext/README.md | 10 +++++----- tests/modules/net_lb_app_ext/test-plan.tfvars | 12 ++++++------ 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/blueprints/apigee/apigee-x-foundations/northbound.tf b/blueprints/apigee/apigee-x-foundations/northbound.tf index 5724542fb5..51ebb2a1d6 100644 --- a/blueprints/apigee/apigee-x-foundations/northbound.tf +++ b/blueprints/apigee/apigee-x-foundations/northbound.tf @@ -66,7 +66,7 @@ module "ext_lb" { use_classic_version = false backend_service_configs = { default = { - backends = [for k, v in local.ext_instances : { backend = google_compute_region_network_endpoint_group.psc_negs[k].id }] + backends = [for k, v in local.ext_instances : { group = google_compute_region_network_endpoint_group.psc_negs[k].id }] protocol = "HTTPS" health_checks = [] outlier_detection = var.ext_lb_config.outlier_detection diff --git a/blueprints/apigee/bigquery-analytics/main.tf b/blueprints/apigee/bigquery-analytics/main.tf index d1534ad77b..5af8342a55 100644 --- a/blueprints/apigee/bigquery-analytics/main.tf +++ b/blueprints/apigee/bigquery-analytics/main.tf @@ -95,7 +95,7 @@ module "glb" { use_classic_version = false backend_service_configs = { default = { - backends = [for k, v in var.instances : { backend = k }] + backends = [for k, v in var.instances : { group = k }] protocol = "HTTPS" health_checks = [] } diff --git a/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/apigee_nb.tf b/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/apigee_nb.tf index bc1035e74d..1021763ca0 100644 --- a/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/apigee_nb.tf +++ b/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/apigee_nb.tf @@ -22,7 +22,7 @@ module "glb" { use_classic_version = false backend_service_configs = { default = { - backends = [{ backend = "neg-0" }] + backends = [{ group = "neg-0" }] protocol = "HTTPS" health_checks = [] } diff --git a/blueprints/cloud-operations/adfs/main.tf b/blueprints/cloud-operations/adfs/main.tf index 27286bbfc7..11c23701ed 100644 --- a/blueprints/cloud-operations/adfs/main.tf +++ b/blueprints/cloud-operations/adfs/main.tf @@ -104,7 +104,7 @@ module "glb" { protocol = "HTTPS" backend_service_configs = { default = { - backends = [{ backend = module.server.group.id }] + backends = [{ group = module.server.group.id }] log_sample_rate = 1 protocol = "HTTPS" } diff --git a/blueprints/networking/glb-and-armor/main.tf b/blueprints/networking/glb-and-armor/main.tf index 22a7c3c7c4..56a69873b4 100644 --- a/blueprints/networking/glb-and-armor/main.tf +++ b/blueprints/networking/glb-and-armor/main.tf @@ -198,8 +198,8 @@ module "glb" { backend_service_configs = { default = { backends = [ - { backend = module.mig_ew1.group_manager.instance_group }, - { backend = module.mig_ue1.group_manager.instance_group } + { group = module.mig_ew1.group_manager.instance_group }, + { group = module.mig_ue1.group_manager.instance_group } ] log_sample_rate = 1 security_policy = try(google_compute_security_policy.policy[0].name, null) diff --git a/blueprints/networking/glb-hybrid-neg-internal/glb.tf b/blueprints/networking/glb-hybrid-neg-internal/glb.tf index b8edd35a85..f9846e1468 100644 --- a/blueprints/networking/glb-hybrid-neg-internal/glb.tf +++ b/blueprints/networking/glb-hybrid-neg-internal/glb.tf @@ -24,12 +24,12 @@ module "hybrid-glb" { default = { backends = [ { - backend = "neg-primary" + group = "neg-primary" balancing_mode = "RATE" max_rate = { per_endpoint = 100 } }, { - backend = "neg-secondary" + group = "neg-secondary" balancing_mode = "RATE" max_rate = { per_endpoint = 100 } } diff --git a/blueprints/networking/psc-glb-and-armor/consumer.tf b/blueprints/networking/psc-glb-and-armor/consumer.tf index e525046ca8..7aa27327d4 100644 --- a/blueprints/networking/psc-glb-and-armor/consumer.tf +++ b/blueprints/networking/psc-glb-and-armor/consumer.tf @@ -68,7 +68,7 @@ module "glb" { backend_service_configs = { default = { backends = [ - { backend = "neg-a" } + { group = "neg-a" } ] health_checks = [] protocol = "HTTPS" @@ -76,7 +76,7 @@ module "glb" { } other = { backends = [ - { backend = "neg-b" } + { group = "neg-b" } ] health_checks = [] protocol = "HTTPS" diff --git a/blueprints/serverless/cloud-run-explore/main.tf b/blueprints/serverless/cloud-run-explore/main.tf index 579f75b4cd..d5428fd90d 100644 --- a/blueprints/serverless/cloud-run-explore/main.tf +++ b/blueprints/serverless/cloud-run-explore/main.tf @@ -75,7 +75,7 @@ module "glb" { backend_service_configs = { default = { backends = [ - { backend = "neg-0" } + { group = "neg-0" } ] health_checks = [] port_name = "http" diff --git a/blueprints/third-party-solutions/phpipam/glb.tf b/blueprints/third-party-solutions/phpipam/glb.tf index 36177c515f..29a60af9fd 100644 --- a/blueprints/third-party-solutions/phpipam/glb.tf +++ b/blueprints/third-party-solutions/phpipam/glb.tf @@ -57,7 +57,7 @@ module "glb" { backend_service_configs = { default = { backends = [ - { backend = "phpipam" } + { group = "phpipam" } ] health_checks = [] port_name = "http" diff --git a/modules/net-lb-app-ext-regional/README.md b/modules/net-lb-app-ext-regional/README.md index 9fdaa98e89..986a583fe7 100644 --- a/modules/net-lb-app-ext-regional/README.md +++ b/modules/net-lb-app-ext-regional/README.md @@ -386,7 +386,7 @@ module "ralb-0" { default = { backends = [ { - backend = "neg-0" + group = "neg-0" balancing_mode = "RATE" max_rate = { per_endpoint = 10 } } @@ -428,7 +428,7 @@ module "ralb-0" { default = { backends = [ { - backend = "neg-0" + group = "neg-0" balancing_mode = "RATE" max_rate = { per_endpoint = 10 } } @@ -617,14 +617,14 @@ module "ralb-0" { neg-gce-0 = { backends = [{ balancing_mode = "RATE" - backend = "neg-zone-c" + group = "neg-zone-c" max_rate = { per_endpoint = 10 } }] } neg-hybrid-0 = { backends = [{ balancing_mode = "RATE" - backend = "neg-hello" + group = "neg-hello" max_rate = { per_endpoint = 10 } }] health_checks = ["neg"] diff --git a/modules/net-lb-app-ext-regional/backend-service.tf b/modules/net-lb-app-ext-regional/backend-service.tf index 3ebc150641..272ddb3586 100644 --- a/modules/net-lb-app-ext-regional/backend-service.tf +++ b/modules/net-lb-app-ext-regional/backend-service.tf @@ -72,7 +72,7 @@ resource "google_compute_region_backend_service" "default" { timeout_sec = each.value.timeout_sec dynamic "backend" { - for_each = { for b in coalesce(each.value.backends, []) : b.backend => b } + for_each = { for b in coalesce(each.value.backends, []) : b.group => b } content { group = lookup(local.group_ids, backend.key, backend.key) balancing_mode = backend.value.balancing_mode # UTILIZATION, RATE diff --git a/modules/net-lb-app-ext/README.md b/modules/net-lb-app-ext/README.md index 231261af0c..7e92ce7486 100644 --- a/modules/net-lb-app-ext/README.md +++ b/modules/net-lb-app-ext/README.md @@ -386,7 +386,7 @@ module "glb-0" { default = { backends = [ { - backend = "myneg-b" + group = "myneg-b" balancing_mode = "RATE" max_rate = { per_endpoint = 10 } } @@ -420,7 +420,7 @@ module "glb-0" { default = { backends = [ { - backend = "neg-0" + group = "neg-0" balancing_mode = "RATE" max_rate = { per_endpoint = 10 } } @@ -460,7 +460,7 @@ module "glb-0" { default = { backends = [ { - backend = "neg-0" + group = "neg-0" balancing_mode = "RATE" max_rate = { per_endpoint = 10 } } @@ -775,14 +775,14 @@ module "glb-0" { neg-gce-0 = { backends = [{ balancing_mode = "RATE" - backend = "neg-zone-c" + group = "neg-zone-c" max_rate = { per_endpoint = 10 } }] } neg-hybrid-0 = { backends = [{ balancing_mode = "RATE" - backend = "neg-hello" + group = "neg-hello" max_rate = { per_endpoint = 10 } }] health_checks = ["neg"] diff --git a/tests/modules/net_lb_app_ext/test-plan.tfvars b/tests/modules/net_lb_app_ext/test-plan.tfvars index 94cc5ab2ae..c44b026176 100644 --- a/tests/modules/net_lb_app_ext/test-plan.tfvars +++ b/tests/modules/net_lb_app_ext/test-plan.tfvars @@ -8,26 +8,26 @@ backend_buckets_config = { backend_service_configs = { default = { backends = [ - { backend = "projects/my-project/zones/europe-west8-b/instanceGroups/ig-b" }, - { backend = "ig-c" } + { group = "projects/my-project/zones/europe-west8-b/instanceGroups/ig-b" }, + { group = "ig-c" } ] } neg-cloudrun = { - backends = [{ backend = "neg-cloudrun" }] + backends = [{ group = "neg-cloudrun" }] health_checks = [] } neg-gce = { - backends = [{ backend = "neg-gce" }] + backends = [{ group = "neg-gce" }] balancing_mode = "RATE" max_rate = { per_endpoint = 10 } } neg-hybrid = { - backends = [{ backend = "neg-hybrid" }] + backends = [{ group = "neg-hybrid" }] balancing_mode = "RATE" max_rate = { per_endpoint = 10 } } neg-internet = { - backends = [{ backend = "neg-internet" }] + backends = [{ group = "neg-internet" }] health_checks = [] } }