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:
File diff suppressed because one or more lines are too long
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -138,7 +138,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
|
||||
)
|
||||
|
||||
@@ -115,6 +115,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
|
||||
|
||||
Reference in New Issue
Block a user