Skip to content

Commit acb0c21

Browse files
committed
fix: update project id for network and project
1 parent 5f5f36c commit acb0c21

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test/fixtures/simple_regional_with_gateway_api/example.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@
1414
* limitations under the License.
1515
*/
1616

17+
locals {
18+
cluster_index = 1
19+
}
20+
1721
module "example" {
1822
source = "../../../examples/simple_regional_with_gateway_api"
1923

20-
project_id = var.project_ids[2]
24+
project_id = var.project_ids[local.cluster_index]
2125
cluster_name_suffix = "-${random_string.suffix.result}"
2226
region = var.region
2327
network = google_compute_network.main.name
2428
subnetwork = google_compute_subnetwork.main.name
2529
ip_range_pods = google_compute_subnetwork.main.secondary_ip_range[0].range_name
2630
ip_range_services = google_compute_subnetwork.main.secondary_ip_range[1].range_name
27-
compute_engine_service_account = var.compute_engine_service_accounts[0]
31+
compute_engine_service_account = var.compute_engine_service_accounts[local.cluster_index]
2832
skip_provisioners = true
2933
enable_binary_authorization = true
3034
gateway_api_channel = "CHANNEL_STANDARD"

test/fixtures/simple_regional_with_gateway_api/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
project = var.project_ids[0]
24+
project = var.project_ids[local.cluster_index]
2525
}
2626

2727
resource "google_compute_network" "main" {

0 commit comments

Comments
 (0)