cloudera.cloud.dw_cluster module – Create or Delete CDP Data Warehouse Clusters

Note

This module is part of the cloudera.cloud collection (version 2.5.1).

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 cloudera.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cloudera.cloud.dw_cluster.

Synopsis

  • Create or Delete CDP Data Warehouse Clusters

Requirements

The below requirements are needed on the host that executes this module.

  • cdpy

Parameters

Parameter

Comments

aws_lb_subnets

list / elements=string

List of zero or more AWS Subnet IDs where the cluster load balancer should be deployed.

Required if state=present and the env is deployed to AWS.

aws_worker_subnets

list / elements=string

List of zero or more AWS Subnet IDs where the cluster worker nodes should be deployed.

Required if state=present and the env is deployed to AWS.

azure

dictionary

Options for activating an Azure CDW Cluster

aks_private_dns_zone

string

ID for the private DNS zone used by AKS.

compute_instance_types

list / elements=string

List of Azure Compute Instance Types that the AKS environment is restricted to use.

Only a single instance type can be listed.

enable_az

boolean

Flag to enable Availability Zone mode.

Required if state=present and the env is deployed to Azure.

Choices:

  • false

  • true

enable_private_aks

boolean

Flag to enable Azure Private AKS mode.

Choices:

  • false

  • true

enable_private_sql

boolean

Flag to enable private SQL for the cluster deployment.

Choices:

  • false

  • true

enable_spot_instances

boolean

Flag to enable spot instances for Virtual warehouses.

Choices:

  • false

  • true

log_analytics_workspace_id

string

Workspace ID for Azure log analytics.

Used to monitor the Azure Kubernetes Service (AKS) cluster.

managed_identity

string

Resource ID of the managed identity used by AKS.

Required if state=present and the env is deployed to Azure.

network_outbound_type

string

Network outbound type.

This setting controls the egress traffic for cluster nodes in Azure Kubernetes Service

Choices:

  • "LoadBalancer"

  • "UserAssignedNATGateway"

  • "UserDefinedRouting"

subnet

string

The Azure Subnet Name.

Required if state=present and the env is deployed to Azure.

cdp_region

aliases: cdp_endpoint_region, endpoint_region

string

Specify the Cloudera Data Platform endpoint region.

Default: "default"

cluster_id

aliases: id, name

string

The identifier of the Data Warehouse Cluster.

Required if state=absent and env is not specified.

custom_subdomain

string

Custom environment subdomain.

Overrides the environment subdomain using a customized domain.

database_backup_retention_period

integer

PostgreSQL server backup retention days

debug

aliases: debug_endpoints

boolean

Capture the CDP SDK debug log.

Choices:

  • false ← (default)

  • true

delay

aliases: polling_delay

integer

The internal polling interval (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared state.

Default: 15

env

aliases: environment, env_crn

string

The name of the target environment.

Required if state=present.

Required if state=absent and cluster_id is not specified.

force

boolean

Flag to enable force deletion of the Data Warehouse Cluster.

This will not destroy the underlying cloud provider assets.

Choices:

  • false ← (default)

  • true

overlay

boolean

Flag to use private IP addresses for Pods within the cluster.

Otherwise, use IP addresses within the VPC.

Choices:

  • false ← (default)

  • true

private_load_balancer

boolean

Flag to set up a load balancer for private subnets.

Choices:

  • false ← (default)

  • true

profile

string

If provided, the CDP SDK will use this value as its profile.

public_worker_node

boolean

Set up public facing worker nodes.

Choices:

  • false

  • true

reserved_compute_nodes

integer

Set additional number of nodes to reserve for executors and coordinators to use during autoscaling.

reserved_shared_services_nodes

integer

Set additional number of nodes to reserve for other services in the cluster.

resource_pool

string

The Resource Pool of the cluster.

state

string

The state of the Data Warehouse Cluster

Choices:

  • "present" ← (default)

  • "absent"

timeout

aliases: polling_timeout

integer

The internal polling timeout (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared state.

Default: 3600

verify_endpoint_tls

aliases: endpoint_tls

boolean

Verify the TLS certificates for the CDP endpoint.

Choices:

  • false

  • true ← (default)

wait

boolean

Flag to enable internal polling to wait for the Data Warehouse Cluster to achieve the declared state.

If set to FALSE, the module will return immediately.

Choices:

  • false

  • true ← (default)

whitelist_k8s_cluster_access_ip_cidrs

aliases: k8s_ip_ranges

list / elements=string

The IP ranges authorized to connect to the Kubernetes API server

whitelist_workload_access_ip_cidrs

aliases: loadbalancer_ip_ranges, workload_ip_ranges

list / elements=string

The IP ranges authorized to connect for workload access

Examples

# Note: These examples do not set authentication details.

# Request Azure Cluster creation
- cloudera.cloud.dw_cluster:
    env_crn: crn:cdp:environments...
    azure:
      subnet: my-subnet-name
      enable_az: yes
      managed_identity: my-aks-managed-identity

# Request AWS Cluster Creation
- cloudera.cloud.dw_cluster:
    env_crn: crn:cdp:environments...
    aws_lb_subnets: [subnet-id-1, subnet-id-2]
    aws_worker_subnets: [subnet-id-3, subnet-id-4]

# Delete a Data Warehouse Cluster
- cloudera.cloud.dw_cluster:
    state: absent
    cluster_id: my-id

# Delete the Data Warehouse Cluster within the Environment
- cloudera.cloud.dw_cluster:
    state: absent
    env: crn:cdp:environments...

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

cluster

dictionary

Details for the Data Warehouse cluster

Returned: success

cloudPlatform

string

The cloud platform of the environment that was used to create this cluster.

Returned: always

creationDate

string

The creation timestamp of the cluster in UTC.

Returned: always

creator

dictionary

The cluster creator details.

Returned: always

crn

string

The Actor CRN.

Returned: always

email

string

Email address (users).

Returned: when supported

machineUsername

string

Username (machine users).

Returned: when supported

workloadUsername

string

Username (users).

Returned: when supported

crn

string

The cluster’s CRN.

Returned: always

environmentCrn

string

The CRN of the cluster’s Environment

Returned: always

id

string

The cluster identifier.

Returned: always

status

string

The status of the cluster

Returned: always

sdk_out

string

Returns the captured CDP SDK log.

Returned: when supported

sdk_out_lines

list / elements=string

Returns a list of each line of the captured CDP SDK log.

Returned: when supported

Authors

  • Dan Chaffelson (@chaffelson)

  • Saravanan Raju (@raju-saravanan)

  • Webster Mudge (@wmudge)