Skip to content

Commit

Permalink
CLOUDP-125097: Fix region provider mismatch (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
blva committed Jun 13, 2022
1 parent 8c5c456 commit 80c8fae
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/cli/atlas/quickstart/quick_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const (
mongoshURL = "https://www.mongodb.com/try/download/shell"
defaultProvider = "AWS"
defaultRegion = "US_EAST_1"
defaultRegionGCP = "US_EAST_4"
defaultRegionAzure = "US_EAST_2"
defaultRegionGov = "US_GOV_EAST_1"
)

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

values.Region = opts.Region
if opts.Region == "" {
values.Region = defaultRegion
if config.CloudGovService == config.Service() {
values.Region = defaultRegionGov
} else {
switch strings.ToUpper(opts.Provider) {
case "AZURE":
values.Region = defaultRegionAzure
case "GCP":
values.Region = defaultRegionGCP
default:
values.Region = defaultRegion
}
}
}

Expand Down

0 comments on commit 80c8fae

Please sign in to comment.