diff --git a/modules/net-vpc/outputs.tf b/modules/net-vpc/outputs.tf index fbf07dba9..f41d5678a 100644 --- a/modules/net-vpc/outputs.tf +++ b/modules/net-vpc/outputs.tf @@ -137,3 +137,8 @@ output "subnets_psc" { description = "Private Service Connect subnet resources." value = { for k, v in google_compute_subnetwork.psc : k => v } } + +output "subnets_global_proxy_only" { + description = "Cross-region internal L7 ILB" + value = { for k, v in google_compute_subnetwork.global_proxy_only : k => v } +} \ No newline at end of file diff --git a/modules/net-vpc/subnets.tf b/modules/net-vpc/subnets.tf index 62bb41efb..e3f8aeac2 100644 --- a/modules/net-vpc/subnets.tf +++ b/modules/net-vpc/subnets.tf @@ -80,7 +80,7 @@ locals { { for k, v in local._factory_subnets : k => v if v.purpose == "PRIVATE_SERVICE_CONNECT" } ) subnets_global_proxy_only = merge( - { for s in var.subnets_psc : "${s.region}/${s.name}" => s }, + { for s in var.subnets_global_proxy_only : "${s.region}/${s.name}" => s }, { for k, v in local._factory_subnets : k => v if v.purpose == "GLOBAL_MANAGED_PROXY" } ) } diff --git a/modules/net-vpc/variables.tf b/modules/net-vpc/variables.tf index d8ca5608d..78cf7a4c9 100644 --- a/modules/net-vpc/variables.tf +++ b/modules/net-vpc/variables.tf @@ -240,6 +240,18 @@ variable "subnets_proxy_only" { nullable = false } +variable "subnets_global_proxy_only" { + description = "List of proxy-only subnets for Cross-region Internal HTTPS load balancers. Note: Only one proxy-only subnet for each VPC network in each region can be active." + type = list(object({ + name = string + ip_cidr_range = string + region = string + description = optional(string) + active = bool + })) + default = [] + nullable = false +} variable "subnets_psc" { description = "List of subnets for Private Service Connect service producers." type = list(object({ diff --git a/tests/modules/net_vpc/psa_routes_export.yaml b/tests/modules/net_vpc/psa_routes_export.yaml index fd9239e81..85ebd929c 100644 --- a/tests/modules/net_vpc/psa_routes_export.yaml +++ b/tests/modules/net_vpc/psa_routes_export.yaml @@ -56,4 +56,5 @@ outputs: subnet_self_links: {} subnets: {} subnets_proxy_only: {} + subnets_global_proxy_only: {} subnets_psc: {} diff --git a/tests/modules/net_vpc/shared_vpc.yaml b/tests/modules/net_vpc/shared_vpc.yaml index 5b6ffd3e5..67c74d889 100644 --- a/tests/modules/net_vpc/shared_vpc.yaml +++ b/tests/modules/net_vpc/shared_vpc.yaml @@ -42,4 +42,5 @@ outputs: subnet_self_links: {} subnets: {} subnets_proxy_only: {} + subnets_global_proxy_only: {} subnets_psc: {}