Skip to content

Commit

Permalink
standardize on "group" key
Browse files Browse the repository at this point in the history
  • Loading branch information
rodriguezsergio committed Dec 19, 2024
1 parent af40e67 commit 01e34c3
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion blueprints/apigee/apigee-x-foundations/northbound.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion blueprints/apigee/bigquery-analytics/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
}
Expand Down
2 changes: 1 addition & 1 deletion blueprints/cloud-operations/adfs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions blueprints/networking/glb-and-armor/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions blueprints/networking/glb-hybrid-neg-internal/glb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down
4 changes: 2 additions & 2 deletions blueprints/networking/psc-glb-and-armor/consumer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ module "glb" {
backend_service_configs = {
default = {
backends = [
{ backend = "neg-a" }
{ group = "neg-a" }
]
health_checks = []
protocol = "HTTPS"
security_policy = google_compute_security_policy.cloud-armor-policy.name
}
other = {
backends = [
{ backend = "neg-b" }
{ group = "neg-b" }
]
health_checks = []
protocol = "HTTPS"
Expand Down
2 changes: 1 addition & 1 deletion blueprints/serverless/cloud-run-explore/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module "glb" {
backend_service_configs = {
default = {
backends = [
{ backend = "neg-0" }
{ group = "neg-0" }
]
health_checks = []
port_name = "http"
Expand Down
2 changes: 1 addition & 1 deletion blueprints/third-party-solutions/phpipam/glb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module "glb" {
backend_service_configs = {
default = {
backends = [
{ backend = "phpipam" }
{ group = "phpipam" }
]
health_checks = []
port_name = "http"
Expand Down
8 changes: 4 additions & 4 deletions modules/net-lb-app-ext-regional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ module "ralb-0" {
default = {
backends = [
{
backend = "neg-0"
group = "neg-0"
balancing_mode = "RATE"
max_rate = { per_endpoint = 10 }
}
Expand Down Expand Up @@ -428,7 +428,7 @@ module "ralb-0" {
default = {
backends = [
{
backend = "neg-0"
group = "neg-0"
balancing_mode = "RATE"
max_rate = { per_endpoint = 10 }
}
Expand Down Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion modules/net-lb-app-ext-regional/backend-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions modules/net-lb-app-ext/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ module "glb-0" {
default = {
backends = [
{
backend = "myneg-b"
group = "myneg-b"
balancing_mode = "RATE"
max_rate = { per_endpoint = 10 }
}
Expand Down Expand Up @@ -420,7 +420,7 @@ module "glb-0" {
default = {
backends = [
{
backend = "neg-0"
group = "neg-0"
balancing_mode = "RATE"
max_rate = { per_endpoint = 10 }
}
Expand Down Expand Up @@ -460,7 +460,7 @@ module "glb-0" {
default = {
backends = [
{
backend = "neg-0"
group = "neg-0"
balancing_mode = "RATE"
max_rate = { per_endpoint = 10 }
}
Expand Down Expand Up @@ -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"]
Expand Down
12 changes: 6 additions & 6 deletions tests/modules/net_lb_app_ext/test-plan.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
}
}
Expand Down

0 comments on commit 01e34c3

Please sign in to comment.