Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion pkg/common/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down