From 9c410e3a1587bbd59c47f5c165282f5fbd7d71c6 Mon Sep 17 00:00:00 2001 From: Gustavo Bazan Date: Tue, 19 Mar 2024 15:21:17 +0000 Subject: [PATCH] CLOUDP-235200: [AtlasCLI] `atlas cluster create` returns invalid MongoDB version error when env MCLI_SERVICE is not defined --- docs/command/atlas-clusters-create.txt | 2 +- internal/store/store.go | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/command/atlas-clusters-create.txt b/docs/command/atlas-clusters-create.txt index bc33d59c9f..ed7fd1f0a3 100644 --- a/docs/command/atlas-clusters-create.txt +++ b/docs/command/atlas-clusters-create.txt @@ -91,7 +91,7 @@ Options - false - Major MongoDB version of the cluster. - Mutually exclusive with --file. + Mutually exclusive with --file. This value defaults to "7.0". * - -m, --members - int - false diff --git a/internal/store/store.go b/internal/store/store.go index ad8096a225..1560b6898e 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -321,14 +321,7 @@ func New(opts ...Option) (*Store, error) { if err != nil { return nil, err } - - switch store.service { - case config.CloudService, config.CloudGovService: - err = store.setAtlasClient(client) - default: - return nil, fmt.Errorf("%w: %s", errUnsupportedService, store.service) - } - if err != nil { + if err = store.setAtlasClient(client); err != nil { return nil, err }