From e336fa4789c1b057c4cd7eca93eda366585aec36 Mon Sep 17 00:00:00 2001 From: Ankit Kinra <1037624+ankitkinra@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:22:23 +0000 Subject: [PATCH 1/2] Revert "Use self_link for subnetwork instead of name." This reverts commit f8c8fd6f6fd4884aa851cef8cbbcaad0b2cd37d6 as that is breaking GKE cluster deployment --- modules/network/multivpc/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/network/multivpc/main.tf b/modules/network/multivpc/main.tf index ee93916860..ee4cdfff64 100644 --- a/modules/network/multivpc/main.tf +++ b/modules/network/multivpc/main.tf @@ -24,7 +24,7 @@ locals { maximum_subnetworks = pow(2, local.subnetwork_new_bits) additional_networks = [ for vpc in module.vpcs : - merge(var.network_interface_defaults, { network = vpc.network_name, subnetwork = vpc.subnetwork_self_link }) + merge(var.network_interface_defaults, { network = vpc.network_name, subnetwork = vpc.subnetwork_name, subnetwork_project = var.project_id }) ] } From 06bf17e9540f85a9564e43a5cb0116dc4675f5f3 Mon Sep 17 00:00:00 2001 From: Ankit Kinra <1037624+ankitkinra@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:13:24 +0000 Subject: [PATCH 2/2] Update the revert to span across three lines for readability --- modules/network/multivpc/main.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/network/multivpc/main.tf b/modules/network/multivpc/main.tf index ee4cdfff64..603ab057d4 100644 --- a/modules/network/multivpc/main.tf +++ b/modules/network/multivpc/main.tf @@ -24,7 +24,11 @@ locals { maximum_subnetworks = pow(2, local.subnetwork_new_bits) additional_networks = [ for vpc in module.vpcs : - merge(var.network_interface_defaults, { network = vpc.network_name, subnetwork = vpc.subnetwork_name, subnetwork_project = var.project_id }) + merge(var.network_interface_defaults, { + network = vpc.network_name + subnetwork = vpc.subnetwork_name + subnetwork_project = var.project_id + }) ] }