Skip to content

Commit a4c8231

Browse files
committed
Update GCP test
1 parent 6eb8b3c commit a4c8231

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

test/gcp/packer_gcp_basic_example_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ var DefaultRetryablePackerErrors = map[string]string{
2222
}
2323
var DefaultTimeBetweenPackerRetries = 15 * time.Second
2424

25+
// Regions that support running f1-micro instances
26+
var RegionsThatSupportF1Micro = []string{"us-central1", "us-east1", "us-west1", "europe-west1"}
27+
2528
// Zones that support running f1-micro instances
2629
var ZonesThatSupportF1Micro = []string{"us-central1-a", "us-east1-b", "us-west1-a", "europe-north1-a", "europe-west1-b", "europe-central2-a"}
2730

test/gcp/terraform_gcp_example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func TestSshAccessToComputeInstance(t *testing.T) {
109109
// Setup values for our Terraform apply
110110
projectID := gcp.GetGoogleProjectIDFromEnvVar(t)
111111
randomValidGcpName := gcp.RandomValidGcpName()
112-
zone := gcp.GetRandomZone(t, projectID, nil, nil, RegionsToAvoid)
112+
zone := gcp.GetRandomZone(t, projectID, ZonesThatSupportF1Micro, nil, nil)
113113

114114
terraformOptions := &terraform.Options{
115115
// The path to where our Terraform code is located

test/gcp/terraform_gcp_ig_example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestTerraformGcpInstanceGroupExample(t *testing.T) {
2424
// Setup values for our Terraform apply
2525
projectId := gcp.GetGoogleProjectIDFromEnvVar(t)
2626

27-
region := gcp.GetRandomRegion(t, projectId, nil, RegionsToAvoid)
27+
region := gcp.GetRandomRegion(t, projectId, RegionsThatSupportF1Micro, nil)
2828

2929
randomValidGcpName := gcp.RandomValidGcpName()
3030
clusterSize := 3

0 commit comments

Comments
 (0)