fixed bug where label field is ignored for policy based routes (#3648)

* fixed bug where label field is ignored for policy based routes

* Fix example and inventory

* Add missing schema

---------

Co-authored-by: Julio Castillo <jccb@google.com>
This commit is contained in:
David Liebert
2026-01-14 22:48:16 +13:00
committed by GitHub
parent 032db2f902
commit 649cab0020
4 changed files with 64 additions and 4 deletions

View File

@@ -640,6 +640,9 @@ module "vpc" {
target = {
tags = ["nva"]
}
labels = {
environment = "prod"
}
}
send-all-to-nva = {
next_hop_ilb_ip = "10.0.0.253"
@@ -651,6 +654,9 @@ module "vpc" {
target = {
interconnect_attachment = "europe-west8"
}
labels = {
environment = "prod"
}
}
}
create_googleapis_routes = null

View File

@@ -131,6 +131,7 @@ resource "google_network_connectivity_policy_based_route" "default" {
network = local.network.id
name = "${var.name}-${each.key}"
description = each.value.description
labels = each.value.labels
priority = each.value.priority
next_hop_other_routes = each.value.use_default_routing ? "DEFAULT_ROUTING" : null
next_hop_ilb_ip = each.value.use_default_routing ? null : each.value.next_hop_ilb_ip