Docs Menu

Docs HomeMongoDB Command Line Interface

mongocli atlas clusters create

On this page

  • Syntax
  • Arguments
  • Options
  • Inherited Options
  • Examples

Create one cluster in the specified project.

To get started quickly, specify a name for your cluster, a cloud provider, and a region to deploy a three-member replica set with the latest MongoDB server version. For full control of your deployment, or to create multi-cloud clusters, provide a JSON configuration file with the --file flag.

mongocli atlas clusters create [name] [options]
Name
Type
Required
Description
name
string
false
Name of the cluster. The cluster name cannot be changed after the cluster is created. Cluster name can contain ASCII letters, numbers, and hyphens.
Name
Type
Required
Description
--backup
false
If true, enables Continuous Cloud Backup for your deployment.
--biConnector
false
If true, enables BI Connector for Atlas on the deployment.
--diskSizeGB
float
false
Capacity, in gigabytes, of the host's root volume. This value defaults to 2.
-f, --file
string
false
File name to use, optional file with a json cluster configuration. To learn more about configuration files for the Atlas CLI, see https://www.mongodb.com/docs/atlas/cli/stable/cluster-config-file/. To learn more about configuration files for MongoCLI, see https://www.mongodb.com/docs/mongocli/stable/reference/mms-cluster-settings-file/.
-h, --help
false
help for create
--mdbVersion
string
false
MongoDB version of the cluster.
-m, --members
int
false
Number of members in the replica set. This value defaults to 3.
-o, --output
string
false
Output format. Valid values are json, json-path, go-template, or go-template-file.
--projectId
string
false
Project ID to use. Overrides the settings in the configuration file or environment variable.
--provider
string
false
Name of your cloud service provider. Valid values are AWS, AZURE, or GCP.
-r, --region
string
false
Physical location of your MongoDB cluster. For a complete list of supported AWS regions, see: https://docs.atlas.mongodb.com/reference/amazon-aws/#amazon-aws. For a complete list of supported Azure regions, see: https://docs.atlas.mongodb.com/reference/microsoft-azure/#microsoft-azure. For a complete list of supported GCP regions, see: https://docs.atlas.mongodb.com/reference/google-gcp/#google-gcp.
-s, --shards
int
false
Number of shards in the cluster. This value defaults to 1.
--tier
string
false
Tier for each data-bearing server in the cluster. This value defaults to "M2".
--type
string
false
Type of the cluster that you want to create. Valid values are REPLICASET or SHARDED. This value defaults to "REPLICASET".
Name
Type
Required
Description
-P, --profile
string
false
Profile to use from your configuration file.
Deploy a free cluster:
$ mongocli atlas cluster create <clusterName> --projectId <projectId> --provider AWS --region US_EAST_1 --tier M0
Deploy a three-member replica set in AWS:
$ mongocli atlas cluster create <clusterName> --projectId <projectId> --provider AWS --region US_EAST_1 --members 3 --tier M10 --mdbVersion 5.0 --diskSizeGB 10
Deploy a three-member replica set in AZURE:
$ mongocli atlas cluster create <clusterName> --projectId <projectId> --provider AZURE --region US_EAST_2 --members 3 --tier M10 --mdbVersion 5.0 --diskSizeGB 10
Deploy a three-member replica set in GCP:
$ mongocli atlas cluster create <clusterName> --projectId <projectId> --provider GCP --region EASTERN_US --members 3 --tier M10 --mdbVersion 5.0 --diskSizeGB 10
Deploy a cluster or a multi-cloud cluster from a JSON configuration file:
$ mongocli atlas cluster create --projectId <projectId> --file <path/to/file.json>
←  mongocli atlas clusters connectionStrings describemongocli atlas clusters delete →