diff --git a/pkg/common/utils.go b/pkg/common/utils.go index b15181b34..b5b22713e 100644 --- a/pkg/common/utils.go +++ b/pkg/common/utils.go @@ -71,7 +71,7 @@ const ( // Example: us multiRegionalLocationFmt = "^[a-z]+$" // Example: us-east1 - regionalLocationFmt = "^[a-z]+-[a-z]+[0-9]$" + regionalLocationFmt = "^[a-z]+-[a-z]+[0-9]{1,2}$" // Full or partial URL of the machine type resource, in the format: // zones/zone/machineTypes/machine-type diff --git a/pkg/common/utils_test.go b/pkg/common/utils_test.go index 1d4cef0e3..84fb46370 100644 --- a/pkg/common/utils_test.go +++ b/pkg/common/utils_test.go @@ -804,10 +804,16 @@ func TestSnapshotStorageLocations(t *testing.T) { []string{"us-east1"}, false, }, + { + "valid region in large continent", + "europe-west12", + []string{"europe-west12"}, + false, + }, { // Zones are not valid bucket/snapshot locations. "single zone", - "us-east1a", + "us-east1-a", []string{}, true, },