community.mongodb.mongodb_atlas_cluster module – Manage database clusters in Atlas
Note
This module is part of the community.mongodb collection (version 1.7.8).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.mongodb
.
To use it in a playbook, specify: community.mongodb.mongodb_atlas_cluster
.
Synopsis
The clusters module provides access to your cluster configurations.
The module lets you create, edit and delete clusters.
Parameters
Parameter |
Comments |
---|---|
The password for use in authentication with the Atlas API. Can use API users and tokens (private key is password) |
|
The username for use in authentication with the Atlas API. Can use API users and tokens (public key is username) |
|
Configure your cluster to automatically scale its storage and cluster tier. |
|
Specifies whether disk auto-scaling is enabled. The default is true. Choices:
|
|
Type of the cluster that you want to create. Choices:
|
|
Capacity, in gigabytes, of the host’s root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (i.e., 4 TB). This value must be a positive integer. |
|
Unique identifier for the Atlas project. |
|
Version of the cluster to deploy. Atlas always deploys the cluster with the latest stable release of the specified version. You can upgrade to a newer version of MongoDB when you modify a cluster. Choices:
|
|
Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed. |
|
Flag that indicates the cluster uses continuous cloud backups. Choices:
|
|
Flag that indicates if the cluster uses Cloud Backups for backups. Choices:
|
|
Configuration for the provisioned servers on which MongoDB runs. The available options are specific to the cloud service provider. |
|
Atlas provides different cluster tiers, each with a default storage capacity and RAM size. The cluster you select is used for all the data-bearing servers in your cluster tier. |
|
Cloud service provider on which the servers are provisioned. |
|
Physical location of your MongoDB cluster. |
|
Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy. Choices:
|
|
State of the ressource. Choices:
|
Examples
- name: test cluster
community.mongodb.mongodb_atlas_cluster:
api_username: "API_user"
api_password: "API_passwort_or_token"
group_id: "GROUP_ID"
name: "testcluster"
mongo_db_major_version: "4.0"
cluster_type: "REPLICASET"
provider_settings:
provider_name: "GCP"
region_name: "EUROPE_WEST_3"
instance_size_name: "M10"
...