Skip to content

Removed defaultMongoDBVersion api call in builders. MongoDB version i… #4054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2025
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions docs/command/atlas-clusters-create.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ Options
* - --mdbVersion
- string
- false
- Major MongoDB version of the cluster.
- Major MongoDB version of the cluster. When no value is specified, the latest stable MongoDB version is used, see: https://www.mongodb.com/resources/products/mongodb-version-history.

Mutually exclusive with --file. This value defaults to "8.0".
Mutually exclusive with --file.
* - -m, --members
- int
- false
Expand Down
10 changes: 6 additions & 4 deletions internal/cli/clusters/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ func (opts *CreateOpts) applyOptsAdvancedCluster(out *atlasClustersPinned.Advanc

if !opts.isTenant() {
out.DiskSizeGB = &opts.diskSizeGB
out.MongoDBMajorVersion = &opts.mdbVersion

// If no MongoDB version is specified, the backend uses the default MongoDB version
if opts.mdbVersion != "" {
out.MongoDBMajorVersion = &opts.mdbVersion
}
}

out.ReplicationSpecs = &[]atlasClustersPinned.ReplicationSpec{replicationSpec}
Expand Down Expand Up @@ -588,8 +592,6 @@ Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M
},
}

currentMDBVersion, _ := cli.DefaultMongoDBMajorVersion()

const (
defaultMembersSize = 3
defaultDiskSize = 2
Expand All @@ -600,7 +602,7 @@ Deprecation note: the M2 and M5 tiers are now deprecated; when selecting M2 or M
cmd.Flags().IntVarP(&opts.members, flag.Members, flag.MembersShort, defaultMembersSize, usage.Members)
cmd.Flags().StringVar(&opts.tier, flag.Tier, atlasFlex, usage.Tier)
cmd.Flags().Float64Var(&opts.diskSizeGB, flag.DiskSizeGB, defaultDiskSize, usage.DiskSizeGB)
cmd.Flags().StringVar(&opts.mdbVersion, flag.MDBVersion, currentMDBVersion, usage.MDBVersion)
cmd.Flags().StringVar(&opts.mdbVersion, flag.MDBVersion, "", usage.MDBVersionCreate)
cmd.Flags().BoolVar(&opts.backup, flag.Backup, false, usage.Backup)
cmd.Flags().BoolVar(&opts.biConnector, flag.BIConnector, false, usage.BIConnector)
cmd.Flags().StringVarP(&opts.filename, flag.File, flag.FileShort, "", usage.ClusterFilename)
Expand Down
1 change: 1 addition & 0 deletions internal/usage/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
NExamples = "Maximum number of example queries to provide that a suggested index will improve."
NIndexes = "Maximum number of indexes to suggest."
MDBVersion = "Major MongoDB version of the cluster."
MDBVersionCreate = "Major MongoDB version of the cluster. When no value is specified, the latest stable MongoDB version is used, see: https://www.mongodb.com/resources/products/mongodb-version-history."
DeploymentMDBVersion = "Major MongoDB version of the deployment."
AtlasAuthDB = "Authentication database name. If the user authenticates with AWS IAM, x.509, or LDAP, this value should be $external. If the user authenticates with SCRAM-SHA, this value should be admin."
Granularity = "ISO 8601-formatted duration that specifies the interval between measurement data points. Only the following subset of ISO 8601-formatted time periods are supported: PT10S, PT1M, PT5M, PT1H, P1D. When you specify granularity, you must specify either period or start and end."
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HTTP/2.0 201 Created
Content-Length: 469
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:01 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 139
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::addAtlasWhitelist
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

{"links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList?includeCount=true&pageNum=1&itemsPerPage=100","rel":"self"}],"results":[{"cidrBlock":"192.168.0.55/32","comment":"test","deleteAfterDate":"2025-07-24T15:11:01Z","groupId":"68824bd5b4489810533462f2","ipAddress":"192.168.0.55","links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList/192.168.0.55%2F32","rel":"self"}]}],"totalCount":1}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HTTP/2.0 201 Created
Content-Length: 428
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:00 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 137
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::addAtlasWhitelist
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

{"links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList?includeCount=true&pageNum=1&itemsPerPage=100","rel":"self"}],"results":[{"cidrBlock":"192.168.0.55/32","comment":"test","groupId":"68824bd5b4489810533462f2","ipAddress":"192.168.0.55","links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList/192.168.0.55%2F32","rel":"self"}]}],"totalCount":1}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
HTTP/2.0 200 OK
Content-Length: 40
Content-Length: 37
Content-Type: application/json
Date: Tue, 22 Jul 2025 05:12:51 GMT
Date: Thu, 24 Jul 2025 15:06:01 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Java-Method: ApiPrivateIpInfoResource::getIpInfo
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=bb9e79411fd875014d78a71092d09e70eba48244; versionString=master
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none
X-Xgen-Up-Proto: HTTP/2

{"currentIpv4Address":"172.174.166.194"}
{"currentIpv4Address":"4.236.159.84"}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HTTP/2.0 201 Created
Content-Length: 428
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:01 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 118
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::addAtlasWhitelist
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

{"links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList?includeCount=true&pageNum=1&itemsPerPage=100","rel":"self"}],"results":[{"cidrBlock":"4.236.159.84/32","comment":"test","groupId":"68824bd5b4489810533462f2","ipAddress":"4.236.159.84","links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList/4.236.159.84%2F32","rel":"self"}]}],"totalCount":1}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
HTTP/2.0 204 No Content
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:01 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 120
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::deleteAtlasWhitelist
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
HTTP/2.0 204 No Content
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:02 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 116
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::deleteAtlasWhitelist
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
HTTP/2.0 204 No Content
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:00 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 136
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::deleteAtlasWhitelist
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HTTP/2.0 200 OK
Content-Length: 242
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:00 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 73
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::getAtlasNetworkPermissionEntry
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

{"cidrBlock":"192.168.0.55/32","comment":"test","groupId":"68824bd5b4489810533462f2","ipAddress":"192.168.0.55","links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList/192.168.0.55%2F32","rel":"self"}]}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HTTP/2.0 200 OK
Content-Length: 428
Content-Type: application/vnd.atlas.2023-01-01+json;charset=utf-8
Date: Thu, 24 Jul 2025 15:06:00 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: mdbws
Strict-Transport-Security: max-age=31536000; includeSubdomains;
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 65
X-Frame-Options: DENY
X-Java-Method: ApiAtlasNetworkAccessListResource::getAtlasWhitelist
X-Java-Version: 17.0.15+6
X-Mongodb-Service-Version: gitHash=8a5d994bc6bc5dc2c9f35e4a815f6c5f6b7e434b; versionString=master
X-Permitted-Cross-Domain-Policies: none

{"links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList?includeCount=true&pageNum=1&itemsPerPage=100","rel":"self"}],"results":[{"cidrBlock":"192.168.0.55/32","comment":"test","groupId":"68824bd5b4489810533462f2","ipAddress":"192.168.0.55","links":[{"href":"http://localhost:8080/api/atlas/v2/groups/68824bd5b4489810533462f2/accessList/192.168.0.55%2F32","rel":"self"}]}],"totalCount":1}
Loading
Loading