t_systems_mms.mongodb_atlas.atlas_cluster (0.3.3) — module

Manage database clusters in Atlas

Authors: Martin Schurz (@schurzi)

preview | supported by community

Install collection

Install with ansible-galaxy collection install t_systems_mms.mongodb_atlas:==0.3.3


Add to requirements.yml

  collections:
    - name: t_systems_mms.mongodb_atlas
      version: 0.3.3

Description

The clusters module provides access to your cluster configurations.

The module lets you create, edit and delete clusters.

L(API Documentation,https://docs.atlas.mongodb.com/reference/api/clusters/)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: test cluster
      atlas_cluster:
        apiUsername: "API_user"
        apiPassword: "API_passwort_or_token"
        groupId: "GROUP_ID"
        name: "testcluster"
        mongoDBMajorVersion: "4.0"
        clusterType: "REPLICASET"
        providerSettings:
          providerName: "GCP"
          regionName: "EUROPE_WEST_3"
          instanceSizeName: "M10"

Inputs

    
name:
    description:
    - Name of the cluster as it appears in Atlas. Once the cluster is created, its name
      cannot be changed.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the ressource.
    type: str

groupId:
    description:
    - Unique identifier for the Atlas project.
    required: true
    type: str

diskSizeGB:
    description:
    - 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.
    type: int

pitEnabled:
    description:
    - Flag that indicates the cluster uses continuous cloud backups.
    type: bool

apiPassword:
    description:
    - The password for use in authentication with the Atlas API.
    - Can use API users and tokens (private key is password)
    required: true
    type: str

apiUsername:
    description:
    - The username for use in authentication with the Atlas API.
    - Can use API users and tokens (public key is username)
    required: true
    type: str

autoScaling:
    description:
    - Configure your cluster to automatically scale its storage and cluster tier.
    required: false
    suboptions:
      diskGBEnabled:
        description:
        - Specifies whether disk auto-scaling is enabled. The default is true.
        type: bool
    type: dict

clusterType:
    choices:
    - REPLICASET
    - SHARDED
    default: REPLICASET
    description:
    - Type of the cluster that you want to create.
    type: str

providerSettings:
    description:
    - Configuration for the provisioned servers on which MongoDB runs.
    - The available options are specific to the cloud service provider.
    required: true
    suboptions:
      instanceSizeName:
        description:
        - 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.
        required: true
        type: str
      providerName:
        description:
        - Cloud service provider on which the servers are provisioned.
        required: true
        type: str
      regionName:
        description:
        - Physical location of your MongoDB cluster.
        required: true
        type: str
    type: dict

replicationFactor:
    choices:
    - 3
    - 5
    - 7
    default: 3
    description:
    - Number of replica set members. Each member keeps a copy of your databases, providing
      high availability and data redundancy.
    type: int

mongoDBMajorVersion:
    choices:
    - '3.6'
    - '4.0'
    - '4.2'
    - '4.4'
    - '5.0'
    - '6.0'
    description:
    - 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.
    type: str

providerBackupEnabled:
    description:
    - Flag that indicates if the cluster uses Cloud Backups for backups.
    type: bool