From acb0c21a4780fa0b64e3cd2f6cf25f151047a7a9 Mon Sep 17 00:00:00 2001 From: Eric Zhao Date: Fri, 30 Dec 2022 10:54:17 +1000 Subject: [PATCH] fix: update project id for network and project --- test/fixtures/simple_regional_with_gateway_api/example.tf | 8 ++++++-- test/fixtures/simple_regional_with_gateway_api/network.tf | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/fixtures/simple_regional_with_gateway_api/example.tf b/test/fixtures/simple_regional_with_gateway_api/example.tf index 6b46123139..189a65ba1e 100644 --- a/test/fixtures/simple_regional_with_gateway_api/example.tf +++ b/test/fixtures/simple_regional_with_gateway_api/example.tf @@ -14,17 +14,21 @@ * limitations under the License. */ +locals { + cluster_index = 1 +} + module "example" { source = "../../../examples/simple_regional_with_gateway_api" - project_id = var.project_ids[2] + project_id = var.project_ids[local.cluster_index] cluster_name_suffix = "-${random_string.suffix.result}" region = var.region network = google_compute_network.main.name subnetwork = google_compute_subnetwork.main.name ip_range_pods = google_compute_subnetwork.main.secondary_ip_range[0].range_name ip_range_services = google_compute_subnetwork.main.secondary_ip_range[1].range_name - compute_engine_service_account = var.compute_engine_service_accounts[0] + compute_engine_service_account = var.compute_engine_service_accounts[local.cluster_index] skip_provisioners = true enable_binary_authorization = true gateway_api_channel = "CHANNEL_STANDARD" diff --git a/test/fixtures/simple_regional_with_gateway_api/network.tf b/test/fixtures/simple_regional_with_gateway_api/network.tf index 94bb29e63c..a7ca31698a 100644 --- a/test/fixtures/simple_regional_with_gateway_api/network.tf +++ b/test/fixtures/simple_regional_with_gateway_api/network.tf @@ -21,7 +21,7 @@ resource "random_string" "suffix" { } provider "google" { - project = var.project_ids[0] + project = var.project_ids[local.cluster_index] } resource "google_compute_network" "main" {