Skip to content

Commit

Permalink
Update GCP test
Browse files Browse the repository at this point in the history
  • Loading branch information
denis256 committed Feb 6, 2023
1 parent 6eb8b3c commit a4c8231
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions test/gcp/packer_gcp_basic_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ var DefaultRetryablePackerErrors = map[string]string{
}
var DefaultTimeBetweenPackerRetries = 15 * time.Second

// Regions that support running f1-micro instances
var RegionsThatSupportF1Micro = []string{"us-central1", "us-east1", "us-west1", "europe-west1"}

// Zones that support running f1-micro instances
var ZonesThatSupportF1Micro = []string{"us-central1-a", "us-east1-b", "us-west1-a", "europe-north1-a", "europe-west1-b", "europe-central2-a"}

Expand Down
2 changes: 1 addition & 1 deletion test/gcp/terraform_gcp_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestSshAccessToComputeInstance(t *testing.T) {
// Setup values for our Terraform apply
projectID := gcp.GetGoogleProjectIDFromEnvVar(t)
randomValidGcpName := gcp.RandomValidGcpName()
zone := gcp.GetRandomZone(t, projectID, nil, nil, RegionsToAvoid)
zone := gcp.GetRandomZone(t, projectID, ZonesThatSupportF1Micro, nil, nil)

terraformOptions := &terraform.Options{
// The path to where our Terraform code is located
Expand Down
2 changes: 1 addition & 1 deletion test/gcp/terraform_gcp_ig_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestTerraformGcpInstanceGroupExample(t *testing.T) {
// Setup values for our Terraform apply
projectId := gcp.GetGoogleProjectIDFromEnvVar(t)

region := gcp.GetRandomRegion(t, projectId, nil, RegionsToAvoid)
region := gcp.GetRandomRegion(t, projectId, RegionsThatSupportF1Micro, nil)

randomValidGcpName := gcp.RandomValidGcpName()
clusterSize := 3
Expand Down

0 comments on commit a4c8231

Please sign in to comment.