Skip to content

Commit 80c8fae

Browse files
authored
CLOUDP-125097: Fix region provider mismatch (#1299)
1 parent 8c5c456 commit 80c8fae

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

internal/cli/atlas/quickstart/quick_start.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ const (
8282
mongoshURL = "https://www.mongodb.com/try/download/shell"
8383
defaultProvider = "AWS"
8484
defaultRegion = "US_EAST_1"
85+
defaultRegionGCP = "US_EAST_4"
86+
defaultRegionAzure = "US_EAST_2"
8587
defaultRegionGov = "US_GOV_EAST_1"
8688
)
8789

@@ -415,9 +417,17 @@ func (opts *Opts) newDefaultValues() (*quickstart, error) {
415417

416418
values.Region = opts.Region
417419
if opts.Region == "" {
418-
values.Region = defaultRegion
419420
if config.CloudGovService == config.Service() {
420421
values.Region = defaultRegionGov
422+
} else {
423+
switch strings.ToUpper(opts.Provider) {
424+
case "AZURE":
425+
values.Region = defaultRegionAzure
426+
case "GCP":
427+
values.Region = defaultRegionGCP
428+
default:
429+
values.Region = defaultRegion
430+
}
421431
}
422432
}
423433

0 commit comments

Comments
 (0)