Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli cloud-manager cluster create

On this page

  • Syntax
  • Options
  • Output
  • Examples

The cluster create command creates a cluster in the specified MongoDB Cloud Manager project. You can also create a cluster through the Cloud Manager console or Automation Configuration API.

mongocli cloud-manager|cm cluster create
--file|-f <cm-settings-file>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --projectId <project-ID> ]

Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
--file, -f
string
Path to the file that contains the settings for creating the cluster. To learn more about the configuration properties to specify in the file, see Cluster Configuration File.
yes
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format

  • go-template for custom output using the Go template

  • go-template-file for custom output specified using Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string
Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.
no
--projectId
string

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.

no

The command prints output similar to the following to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.

Changes are being applied, please check http://cloud.mongodb.com/v2/<projectId>#deployment/topology for status

where projectId is the unique identifier of the project.

The following examples show two ways to run the command.

The following mongocli cm cluster create command creates a cluster named myCluster in the specified project using:

mongocli cloud-manager cluster create \
--file cm-cluster.json \
--projectId 5e2f06127a3e5a5700de8d8d

The following mongocli cloud-manager cluster create command creates a cluster named myCluster in the specified project using:

  • A file named cm-cluster.yaml, which contains the settings in the sample file in .yaml format

  • A custom profile named egCMprofile

mongocli cloud-manager cluster create \
--file cm-cluster.yaml \
--projectId 5e2f06127a3e5a5700de8d8d \
--profile egCMprofile

The Example 1 and Example 2 commands print the following to the terminal:

Changes are being applied, please check https://cloud.mongodb.com/v2/<projectId>#deployment/topology for status

Back

Describe a Cluster