Skip to content

Commit ce19f75

Browse files
authored
(DOCSP-30198) Clarifies options/args required if you don't use file option (#2002)
1 parent 122620e commit ce19f75

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

docs/atlascli/command/atlas-clusters-create.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Arguments
4343
* - name
4444
- string
4545
- false
46-
- Name of the cluster. The cluster name cannot be changed after the cluster is created. Cluster name can contain ASCII letters, numbers, and hyphens.
46+
- Name of the cluster. The cluster name cannot be changed after the cluster is created. Cluster name can contain ASCII letters, numbers, and hyphens. You must specify the cluster name argument if you don't use the --file option.
4747

4848
Options
4949
-------
@@ -99,11 +99,11 @@ Options
9999
* - --provider
100100
- string
101101
- false
102-
- Name of your cloud service provider. Valid values are AWS, AZURE, or GCP.
102+
- Name of your cloud service provider. Valid values are AWS, AZURE, or GCP. You must specify the provider option if you don't use the --file option.
103103
* - -r, --region
104104
- string
105105
- false
106-
- Physical location of your MongoDB cluster. For a complete list of supported AWS regions, see: https://www.mongodb.com/docs/atlas/reference/amazon-aws/. For a complete list of supported Azure regions, see: https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#microsoft-azure. For a complete list of supported GCP regions, see: https://www.mongodb.com/docs/atlas/reference/google-gcp/..
106+
- Physical location of your MongoDB cluster. You must specify the region option if you don't use the --file option. For a complete list of supported AWS regions, see: https://www.mongodb.com/docs/atlas/reference/amazon-aws/. For a complete list of supported Azure regions, see: https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#microsoft-azure. For a complete list of supported GCP regions, see: https://www.mongodb.com/docs/atlas/reference/google-gcp/.
107107
* - -s, --shards
108108
- int
109109
- false

docs/mongocli/command/mongocli-atlas-clusters-create.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Arguments
4343
* - name
4444
- string
4545
- false
46-
- Name of the cluster. The cluster name cannot be changed after the cluster is created. Cluster name can contain ASCII letters, numbers, and hyphens.
46+
- Name of the cluster. The cluster name cannot be changed after the cluster is created. Cluster name can contain ASCII letters, numbers, and hyphens. You must specify the cluster name argument if you don't use the --file option.
4747

4848
Options
4949
-------
@@ -99,11 +99,11 @@ Options
9999
* - --provider
100100
- string
101101
- false
102-
- Name of your cloud service provider. Valid values are AWS, AZURE, or GCP.
102+
- Name of your cloud service provider. Valid values are AWS, AZURE, or GCP. You must specify the provider option if you don't use the --file option.
103103
* - -r, --region
104104
- string
105105
- false
106-
- Physical location of your MongoDB cluster. For a complete list of supported AWS regions, see: https://www.mongodb.com/docs/atlas/reference/amazon-aws/. For a complete list of supported Azure regions, see: https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#microsoft-azure. For a complete list of supported GCP regions, see: https://www.mongodb.com/docs/atlas/reference/google-gcp/..
106+
- Physical location of your MongoDB cluster. You must specify the region option if you don't use the --file option. For a complete list of supported AWS regions, see: https://www.mongodb.com/docs/atlas/reference/amazon-aws/. For a complete list of supported Azure regions, see: https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#microsoft-azure. For a complete list of supported GCP regions, see: https://www.mongodb.com/docs/atlas/reference/google-gcp/.
107107
* - -s, --shards
108108
- int
109109
- false

internal/cli/atlas/clusters/create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ For full control of your deployment, or to create multi-cloud clusters, provide
245245
return opts.Run()
246246
},
247247
Annotations: map[string]string{
248-
"nameDesc": "Name of the cluster. The cluster name cannot be changed after the cluster is created. Cluster name can contain ASCII letters, numbers, and hyphens.",
248+
"nameDesc": "Name of the cluster. The cluster name cannot be changed after the cluster is created. Cluster name can contain ASCII letters, numbers, and hyphens. You must specify the cluster name argument if you don't use the --file option.",
249249
"output": createTmpl,
250250
},
251251
}
@@ -257,8 +257,8 @@ For full control of your deployment, or to create multi-cloud clusters, provide
257257
defaultDiskSize = 2
258258
defaultShardSize = 1
259259
)
260-
cmd.Flags().StringVar(&opts.provider, flag.Provider, "", usage.Provider)
261-
cmd.Flags().StringVarP(&opts.region, flag.Region, flag.RegionShort, "", usage.Region)
260+
cmd.Flags().StringVar(&opts.provider, flag.Provider, "", usage.CreateProvider)
261+
cmd.Flags().StringVarP(&opts.region, flag.Region, flag.RegionShort, "", usage.CreateRegion)
262262
cmd.Flags().IntVarP(&opts.members, flag.Members, flag.MembersShort, defaultMembersSize, usage.Members)
263263
cmd.Flags().StringVar(&opts.tier, flag.Tier, atlasM2, usage.Tier)
264264
cmd.Flags().Float64Var(&opts.diskSizeGB, flag.DiskSizeGB, defaultDiskSize, usage.DiskSizeGB)

internal/usage/usage.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,10 @@ dbName and collection are required only for built-in roles.`
320320
AccessListType = "Type of access list entry. Valid values are cidrBlock, ipAddress, or awsSecurityGroup."
321321
Service = "Type of MongoDB service. Valid values are cloud, cloudgov, cloud-manager, or ops-manager."
322322
Provider = "Name of your cloud service provider. Valid values are AWS, AZURE, or GCP."
323+
CreateProvider = "Name of your cloud service provider. Valid values are AWS, AZURE, or GCP. You must specify the provider option if you don't use the --file option."
323324
ClusterTypes = "Type of the cluster that you want to create. Valid values are REPLICASET or SHARDED."
324325
Region = "Physical location of your MongoDB cluster. For a complete list of supported AWS regions, see: https://www.mongodb.com/docs/atlas/reference/amazon-aws/. For a complete list of supported Azure regions, see: https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#microsoft-azure. For a complete list of supported GCP regions, see: https://www.mongodb.com/docs/atlas/reference/google-gcp/.."
326+
CreateRegion = "Physical location of your MongoDB cluster. You must specify the region option if you don't use the --file option. For a complete list of supported AWS regions, see: https://www.mongodb.com/docs/atlas/reference/amazon-aws/. For a complete list of supported Azure regions, see: https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#microsoft-azure. For a complete list of supported GCP regions, see: https://www.mongodb.com/docs/atlas/reference/google-gcp/."
325327
AWSIAMType = "AWS IAM method by which the provided username is authenticated. Valid values are NONE, USER, or ROLE. If you set this to USER or ROLE, the user authenticates with IAM credentials and doesn't need a password. If you set this to USER or ROLE, you can't set --x509Type or --ldapType to any value other than NONE."
326328
X509Type = "X.509 method by which the provided username is authenticated. Valid values are NONE, MANAGED, or CUSTOMER. If you set this to MANAGED the user authenticates with an Atlas-managed X.509 certificate. If you set this to CUSTOMER, the user authenticates with a self-managed X.509 certificate. If you set this to MANAGED or CUSTOMER, you can't set --awsIAMType or --ldapType to any value other than NONE."
327329
LDAPType = "LDAP method by which the provided username is authenticated. Valid values are NONE, USER, or GROUP. If you set this to USER or GROUP, the user authenticates with LDAP. If you set this to USER or GROUP, you can't set --x509Type or --awsIAMType to any value other than NONE."

0 commit comments

Comments
 (0)