File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ locals {
1919 labels = merge (var. labels , { ghpc_module = " private-service-access" , ghpc_role = " network" })
2020}
2121
22+ locals {
23+ split_network_id = split (" /" , var. network_id )
24+ network_name = local. split_network_id [4 ]
25+ network_project = local. split_network_id [1 ]
26+ }
27+
2228resource "random_id" "resource_name_suffix" {
2329 byte_length = 4
2430}
@@ -45,7 +51,8 @@ resource "google_service_networking_connection" "private_vpc_connection" {
4551# Google Cloud NetApp Volumes need enablement of custom_route import and export
4652resource "google_compute_network_peering_routes_config" "private_vpc_peering_routes_gcnv" {
4753 count = var. service_name == " netapp.servicenetworking.goog" ? 1 : 0
48- network = var. network_id
54+ project = local. network_project
55+ network = local. network_name
4956 peering = google_service_networking_connection. private_vpc_connection . peering
5057
5158 export_custom_routes = true
You can’t perform that action at this time.
0 commit comments