From a4675e3c81fa91aaf74786a07681449a219f6471 Mon Sep 17 00:00:00 2001 From: Denis O Date: Thu, 24 Feb 2022 23:55:29 +0200 Subject: [PATCH] GCP tests fixes (#1065) * Updated reference to GCP images * Disabled southamerica-west1 since it can't support f1-micro --- examples/terraform-gcp-example/main.tf | 2 +- examples/terraform-gcp-ig-example/main.tf | 2 +- modules/gcp/compute_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/terraform-gcp-example/main.tf b/examples/terraform-gcp-example/main.tf index 679452dbd..e1778abe5 100644 --- a/examples/terraform-gcp-example/main.tf +++ b/examples/terraform-gcp-example/main.tf @@ -23,7 +23,7 @@ resource "google_compute_instance" "example" { boot_disk { initialize_params { - image = "ubuntu-os-cloud/ubuntu-1604-lts" + image = "ubuntu-os-cloud/ubuntu-2004-lts" } } diff --git a/examples/terraform-gcp-ig-example/main.tf b/examples/terraform-gcp-ig-example/main.tf index 6af1852bc..eafcc4e28 100644 --- a/examples/terraform-gcp-ig-example/main.tf +++ b/examples/terraform-gcp-ig-example/main.tf @@ -47,7 +47,7 @@ resource "google_compute_instance_template" "example" { disk { boot = true auto_delete = true - source_image = "ubuntu-os-cloud/ubuntu-1604-lts" + source_image = "ubuntu-os-cloud/ubuntu-2004-lts" } network_interface { diff --git a/modules/gcp/compute_test.go b/modules/gcp/compute_test.go index da960a499..24c436342 100644 --- a/modules/gcp/compute_test.go +++ b/modules/gcp/compute_test.go @@ -27,7 +27,7 @@ func TestGetPublicIpOfInstance(t *testing.T) { instanceName := RandomValidGcpName() projectID := GetGoogleProjectIDFromEnvVar(t) - zone := GetRandomZone(t, projectID, nil, nil, nil) + zone := GetRandomZone(t, projectID, nil, nil, []string{"southamerica-west1"}) createComputeInstance(t, projectID, zone, instanceName) defer deleteComputeInstance(t, projectID, zone, instanceName)