Support one group per zone in compute-vm (#218)

* support multiple groups per zone in compute-vm

* fix ilb as next hop example
This commit is contained in:
Ludovico Magnocavallo
2021-04-01 08:27:38 +02:00
committed by GitHub
parent 1ca439440a
commit 3597769e8e
6 changed files with 32 additions and 17 deletions

View File

@@ -99,16 +99,18 @@ module "ilb" {
network = var.vpc.self_link
subnetwork = var.subnet.self_link
ports = [80]
backends = [{
failover = false
group = module.instance-group.group.self_link
balancing_mode = "CONNECTION"
}]
backends = [
for name, group in module.instance-group.groups : {
failover = false
group = group.self_link
balancing_mode = "CONNECTION"
}
]
health_check_config = {
type = "http", check = { port = 80 }, config = {}, logging = true
}
}
# tftest:modules=2:resources=5
# tftest:modules=2:resources=6
```
<!-- BEGIN TFDOC -->