Data Platform Nodepool

dataplatform_nodepool

This is a simple module that supports creating or removing Data Platform Nodepools. This module has a dependency on ionoscloud_dataplatform >= 1.0.0

⚠️ 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 DataPlatform cluster nodepool
ionoscloudsdk.ionoscloud.dataplatform_nodepool:
  name: my-nodepool
  cluster: ''
  node_count: 2
  cpu_family: INTEL_SKYLAKE
  cores_count: 1
  ram_size: 2048
  availability_zone: AUTO
  storage_type: HDD
  storage_size: '100'
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  labels:
    foo: bar
    color: red
    size: '10'
  annotations:
    ann1: value1
    ann2: value2
  wait: true
  wait_timeout: 7200
register: result


name: Update DataPlatform cluster nodepool no change
ionoscloudsdk.ionoscloud.dataplatform_nodepool:
  cluster: ''
  nodepool: ''
  name: my-nodepool
  node_count: 2
  cpu_family: INTEL_SKYLAKE
  cores_count: 1
  ram_size: 2048
  availability_zone: AUTO
  storage_type: HDD
  storage_size: '100'
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  labels:
    foo: bar
    color: red
    size: '10'
  annotations:
    ann1: value1
    ann2: value2
  allow_replace: false
  wait: true
  wait_timeout: 7200
  state: update
register: result_no_change


name: Delete DataPlatform cluster nodepool
ionoscloudsdk.ionoscloud.dataplatform_nodepool:
  cluster: ''
  nodepool: ''
  wait: true
  state: absent

Returned object

{
    "changed": true,
    "failed": false,
    "action": "create",
    "dataplatform_nodepool": {
        "id": "6fcf85d2-d503-41e7-9f08-cbfa9ac6be80",
        "type": "nodepool",
        "href": "https://api.ionos.com/dataplatform/clusters/fe6a5792-7473-4067-ba83-6d135582e623/nodepools/6fcf85d2-d503-41e7-9f08-cbfa9ac6be80",
        "metadata": {
            "e_tag": null,
            "created_date": "2023-05-29T14:06:54+00:00",
            "created_by": "<USER_EMAIL>",
            "created_by_user_id": "<USER_ID>",
            "created_in_contract_number": "31909592",
            "last_modified_date": "2023-05-29T14:06:54+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": "my-nodepool",
            "data_platform_version": null,
            "datacenter_id": "f68205d8-8334-43b0-9f64-b06babcf5bd6",
            "node_count": 2,
            "cpu_family": "INTEL_SKYLAKE",
            "cores_count": 1,
            "ram_size": 2048,
            "availability_zone": "AUTO",
            "storage_type": "HDD",
            "storage_size": 100,
            "maintenance_window": {
                "time": "12:02:00",
                "day_of_the_week": "Wednesday"
            },
            "labels": {
                "color": "red",
                "foo": "bar",
                "size": "10"
            },
            "annotations": {
                "ann1": "value1",
                "ann2": "value2"
            }
        }
    }
}

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:

  • name

  • cpu_family

  • cores_count

  • ram_size

  • availability_zone

  • storage_type

  • storage_size

state: present

  
name: Create DataPlatform cluster nodepool
ionoscloudsdk.ionoscloud.dataplatform_nodepool:
  name: my-nodepool
  cluster: ''
  node_count: 2
  cpu_family: INTEL_SKYLAKE
  cores_count: 1
  ram_size: 2048
  availability_zone: AUTO
  storage_type: HDD
  storage_size: '100'
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  labels:
    foo: bar
    color: red
    size: '10'
  annotations:
    ann1: value1
    ann2: value2
  wait: true
  wait_timeout: 7200
register: result

Available parameters for state present:

NameRequiredDescription

name str

True

The name of your node pool. 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 name or ID of the Data Platform cluster.

node_count int

True

The number of nodes that make up the node pool.

cpu_family str

True

A valid CPU family name or `AUTO` if the platform shall choose the best fitting option. Available CPU architectures can be retrieved from the data center resource.

cores_count int

True

The number of CPU cores per node.

ram_size int

True

The RAM size for one node in MB. Must be set in multiples of 1024 MB, with a minimum size is of 2048 MB.

availability_zone str

True

The availability zone of the virtual data center region where the node pool resources should be provisioned.

storage_type str

True

The type of hardware for the volume.

storage_size int

True

The size of the volume in GB. The size must be greater than 10 GB.

maintenance_window dict

False

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

labels dict

False

Key-value pairs attached to the node pool resource as [Kubernetes labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).

annotations dict

False

Key-value pairs attached to node pool resource as [Kubernetes annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/).

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 DataPlatform cluster nodepool
ionoscloudsdk.ionoscloud.dataplatform_nodepool:
  cluster: ''
  nodepool: ''
  wait: true
  state: absent

Available parameters for state absent:

NameRequiredDescription

cluster str

True

The name or ID of the Data Platform cluster.

nodepool str

True

The name or ID of the Data Platform nodepool.

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: Update DataPlatform cluster nodepool no change
ionoscloudsdk.ionoscloud.dataplatform_nodepool:
  cluster: ''
  nodepool: ''
  name: my-nodepool
  node_count: 2
  cpu_family: INTEL_SKYLAKE
  cores_count: 1
  ram_size: 2048
  availability_zone: AUTO
  storage_type: HDD
  storage_size: '100'
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  labels:
    foo: bar
    color: red
    size: '10'
  annotations:
    ann1: value1
    ann2: value2
  allow_replace: false
  wait: true
  wait_timeout: 7200
  state: update
register: result_no_change

Available parameters for state update:

NameRequiredDescription

name str

False

The name of your node pool. 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 name or ID of the Data Platform cluster.

nodepool str

True

The name or ID of the Data Platform nodepool.

node_count int

False

The number of nodes that make up the node pool.

maintenance_window dict

False

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

labels dict

False

Key-value pairs attached to the node pool resource as [Kubernetes labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).

annotations dict

False

Key-value pairs attached to node pool resource as [Kubernetes annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/).

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