Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
fix(examples): Add 'name_prefix' for external lb rules (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbil authored Jan 4, 2024
1 parent 27bcc01 commit a1fb93b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/multi_nic_common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ module "lb_external" {

name = "${var.name_prefix}${each.value.name}"
backend_instance_groups = { for v in each.value.backends : v => module.vmseries[v].instance_group_self_link }
rules = each.value.rules
rules = { for k, v in each.value.rules : "${var.name_prefix}${k}" => v }

health_check_http_port = each.value.http_health_check_port
health_check_http_request_path = try(each.value.http_health_check_request_path, "/php/login.php")
Expand Down
2 changes: 1 addition & 1 deletion examples/vmseries_ha/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ module "lb_external" {

name = "${var.name_prefix}${each.value.name}"
backend_instance_groups = { for v in each.value.backends : v => module.vmseries[v].instance_group_self_link }
rules = each.value.rules
rules = { for k, v in each.value.rules : "${var.name_prefix}${k}" => v }

health_check_http_port = each.value.http_health_check_port
health_check_http_request_path = try(each.value.http_health_check_request_path, "/php/login.php")
Expand Down
2 changes: 1 addition & 1 deletion examples/vpc_peering_common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ module "lb_external" {

name = "${var.name_prefix}${each.value.name}"
backend_instance_groups = { for v in each.value.backends : v => module.vmseries[v].instance_group_self_link }
rules = each.value.rules
rules = { for k, v in each.value.rules : "${var.name_prefix}${k}" => v }

health_check_http_port = each.value.http_health_check_port
health_check_http_request_path = try(each.value.http_health_check_request_path, "/php/login.php")
Expand Down
2 changes: 1 addition & 1 deletion examples/vpc_peering_common_with_autoscale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module "lb_external" {
"${v}_${z_k}" => module.autoscale[v].zonal_instance_group_ids[z_k]
}
]...)
rules = each.value.rules
rules = { for k, v in each.value.rules : "${var.name_prefix}${k}" => v }

health_check_http_port = each.value.http_health_check_port
health_check_http_request_path = try(each.value.http_health_check_request_path, "/php/login.php")
Expand Down
2 changes: 1 addition & 1 deletion examples/vpc_peering_common_with_network_tags/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ module "lb_external" {

name = "${var.name_prefix}${each.value.name}-${each.value.region}"
backend_instance_groups = { for v in each.value.backends : v => module.vmseries[v].instance_group_self_link }
rules = each.value.rules
rules = { for k, v in each.value.rules : "${var.name_prefix}${k}" => v }

health_check_http_port = each.value.http_health_check_port
health_check_http_request_path = try(each.value.http_health_check_request_path, "/php/login.php")
Expand Down
2 changes: 1 addition & 1 deletion examples/vpc_peering_dedicated_with_autoscale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module "lb_external" {
"${v}_${z_k}" => module.autoscale[v].zonal_instance_group_ids[z_k]
}
]...)
rules = each.value.rules
rules = { for k, v in each.value.rules : "${var.name_prefix}${k}" => v }

health_check_http_port = each.value.http_health_check_port
health_check_http_request_path = try(each.value.http_health_check_request_path, "/php/login.php")
Expand Down

0 comments on commit a1fb93b

Please sign in to comment.