Use context in ilb routes (#3462)

* Use context in ilb routes

* Tests context
This commit is contained in:
Simone Ruffilli
2025-10-24 11:06:54 +02:00
committed by GitHub
parent 885ba2fb05
commit b13ccfe691
3 changed files with 45 additions and 22 deletions

View File

@@ -72,9 +72,11 @@ resource "google_compute_route" "ilb" {
dest_range = lookup(
local.ctx.cidr_ranges, each.value.dest_range, each.value.dest_range
)
priority = each.value.priority
tags = each.value.tags
next_hop_ilb = each.value.next_hop
priority = each.value.priority
tags = each.value.tags
next_hop_ilb = lookup(
local.ctx.addresses, each.value.next_hop, each.value.next_hop
)
}
resource "google_compute_route" "instance" {