Add support for cross project NEGs (#3215)

* Added cross project NEG support
* Made neg_configs variable same as in net-lb-app-int
* Added support for cross-project negs in net-lb-app-ext-regional module


---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
Co-authored-by: Ludovico Magnocavallo <ludo@qix.it>
Co-authored-by: Julio Castillo <juliocc@gmail.com>
Co-authored-by: Wiktor Niesiobędzki <wiktorn@google.com>
This commit is contained in:
kovagoadam
2025-07-28 10:27:55 +02:00
committed by GitHub
parent 8405527a7b
commit 3e0810dfef
6 changed files with 25 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@@ -151,7 +151,11 @@ resource "google_compute_region_network_endpoint_group" "psc" {
resource "google_compute_region_network_endpoint_group" "serverless" {
for_each = local.neg_regional_serverless
project = var.project_id
project = (
each.value.project_id == null
? var.project_id
: each.value.project_id
)
region = try(
each.value.cloudrun.region, each.value.cloudfunction.region, null
)

View File

@@ -66,6 +66,7 @@ variable "name" {
variable "neg_configs" {
description = "Optional network endpoint groups to create. Can be referenced in backends via key or outputs."
type = map(object({
project_id = optional(string)
description = optional(string)
cloudfunction = optional(object({
region = string