Data Platform Cluster

dataplatform_cluster

This is a simple module that supports creating or removing Data Platform Clusters. This module has a dependency on ionoscloud >= 6.0.2

⚠️ Note: Data Platform is currently in the Early Access (EA) phase. We recommend keeping usage and testing to non-production critical applications. Please contact your sales representative or support for more information.

Example Syntax


name: Create Data Platform cluster
ionoscloudsdk.ionoscloud.dataplatform_cluster:
  name: 'AnsibleAutoTestDataPlatform'
  dataplatform_version: '23.11'
  datacenter: ''
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  state: present
  wait: true
  wait_timeout: 7200
register: cluster_response


name: Patch Data Platform cluster no change
ionoscloudsdk.ionoscloud.dataplatform_cluster:
  cluster: 'AnsibleAutoTestDataPlatform'
  dataplatform_version: '23.11'
  allow_replace: false
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  state: update
  wait: true
  wait_timeout: 7200
register: cluster_response_nochange


name: Delete Data Platform cluster
ionoscloudsdk.ionoscloud.dataplatform_cluster:
  cluster: ''
  state: absent
  wait: true
  wait_timeout: 2000

Returned object

{
    "changed": true,
    "failed": false,
    "action": "create",
    "dataplatform_cluster": {
        "id": "fe6a5792-7473-4067-ba83-6d135582e623",
        "type": "cluster",
        "href": "https://api.ionos.com/dataplatform/clusters/fe6a5792-7473-4067-ba83-6d135582e623",
        "metadata": {
            "e_tag": null,
            "created_date": "2023-05-29T13:55:51+00:00",
            "created_by": "<USER_EMAIL>",
            "created_by_user_id": "<USER_ID>",
            "created_in_contract_number": "31909592",
            "last_modified_date": "2023-05-29T13:55:51+00:00",
            "last_modified_by": "<USER_EMAIL>",
            "last_modified_by_user_id": "<USER_ID>",
            "current_data_platform_version": "22.11",
            "current_data_platform_revision": 1,
            "available_upgrade_versions": [],
            "state": "DEPLOYING"
        },
        "properties": {
            "name": "AnsibleAutoTestDataPlatform3",
            "data_platform_version": "22.11",
            "datacenter_id": "f68205d8-8334-43b0-9f64-b06babcf5bd6",
            "maintenance_window": {
                "time": "12:02:00",
                "day_of_the_week": "Wednesday"
            }
        }
    }
}

For more examples please check out the tests here.

NOTE: If you are using a versions 7.0.0 and up: modules can replace resources if certain set parameters differ from the results found in the API!

Parameters that can trigger a resource replacement:

  • datacenter

state: present

  
name: Create Data Platform cluster
ionoscloudsdk.ionoscloud.dataplatform_cluster:
  name: 'AnsibleAutoTestDataPlatform'
  dataplatform_version: '23.11'
  datacenter: ''
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  state: present
  wait: true
  wait_timeout: 7200
register: cluster_response

Available parameters for state present:

Name
Required
Description

name str

True

The name of your cluster. Must be 63 characters or less and must begin and end with an alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.

dataplatform_version str

False

The version of the data platform.

datacenter str

True

The UUID of the virtual data center (VDC) the cluster is provisioned.

maintenance_window dict

False

Starting time of a weekly 4-hour-long window, during which maintenance might occur in the `HH:MM:SS` format.

allow_replace bool

False

Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead Default: False

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: absent

  
name: Delete Data Platform cluster
ionoscloudsdk.ionoscloud.dataplatform_cluster:
  cluster: ''
  state: absent
  wait: true
  wait_timeout: 2000

Available parameters for state absent:

Name
Required
Description

cluster str

True

The ID or name of the Data Platform cluster.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: update

  
name: Patch Data Platform cluster no change
ionoscloudsdk.ionoscloud.dataplatform_cluster:
  cluster: 'AnsibleAutoTestDataPlatform'
  dataplatform_version: '23.11'
  allow_replace: false
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  state: update
  wait: true
  wait_timeout: 7200
register: cluster_response_nochange

Available parameters for state update:

Name
Required
Description

name str

False

The name of your cluster. Must be 63 characters or less and must begin and end with an alphanumeric character (`[a-z0-9A-Z]`) with dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.

cluster str

True

The ID or name of the Data Platform cluster.

dataplatform_version str

True

The version of the data platform.

datacenter str

False

The UUID of the virtual data center (VDC) the cluster is provisioned.

maintenance_window dict

True

Starting time of a weekly 4-hour-long window, during which maintenance might occur in the `HH:MM:SS` format.

allow_replace bool

False

Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead Default: False

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

Last updated