cloudera.cloud.dw_cluster module – Create or delete CDP Data Warehouse clusters

Note

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

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.

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

New in cloudera.cloud 1.0.0

Synopsis

  • Create or delete CDP Data Warehouse clusters.

  • Cluster creation uses provider-specific endpoints (AWS, Azure, Private Cloud), determined automatically from the environment or explicitly via cloud_platform.

  • Reconciliation of existing clusters is not yet implemented; the module warns when state=present targets an existing cluster.

  • The module supports check_mode and diff_mode.

Parameters

Parameter

Comments

access_key

string

If provided, the Cloudera on cloud API will use this value as its access key.

If not provided, the API will attempt to use the value from the environment variable CDP_ACCESS_KEY_ID.

Required if private_key is provided.

Mutually exclusive with credentials_path.

aws

dictionary

Options for activating an AWS CDW Cluster.

custom_ami_id

string

Custom AMI ID for the cluster nodes.

custom_registry_options

dictionary

Options for a custom ECR registry.

registry_type

string

Custom registry type.

Choices:

  • "ACR"

  • "ECR"

repository_url

string

URL of the custom image repository.

enable_private_eks

boolean

Set up AWS EKS cluster in private-only mode with restricted access.

Choices:

  • false

  • true

enable_spot_instances

boolean

Enable Spot instances for Virtual warehouses.

Cannot be updated after creation.

Choices:

  • false

  • true

lb_subnets

list / elements=string

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

node_role_cdw_managed_policy_arn

string

Managed Policy ARN to attach to the Node Instance Role.

non_transparent_proxy

dictionary

bypassed_domains

list / elements=string

Domains where the proxy is bypassed.

use

boolean

Switch using the default non-transparent proxy on or off.

Choices:

  • false

  • true

reduced_permission_mode

boolean

Activate the environment with fewer than half of the standard required IAM permissions.

Choices:

  • false

  • true

worker_subnets

list / elements=string

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

aws_lb_subnets

aliases: aws_public_subnets

list / elements=string

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

Deprecated in favor of aws.lb_subnets.

aws_worker_subnets

aliases: aws_private_subnets

list / elements=string

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

Deprecated in favor of aws.worker_subnets.

azure

dictionary

Options for activating an Azure CDW Cluster.

aks_pod_cidr

string

CIDR range for AKS pods.

aks_private_dns_zone

string

ID for the private DNS zone used by AKS.

compute_instance_types

list / elements=string

Deprecated. This parameter has no effect and will be removed in a future release.

custom_registry_options

dictionary

Options for a custom ACR registry.

registry_type

string

Custom registry type.

Choices:

  • "ACR"

  • "ECR"

repository_url

string

URL of the custom image repository.

enable_az

boolean

Flag to enable Availability Zone mode.

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"

private_dns_zone_sql

string

ID for the private DNS zone used by SQL.

private_sql_subnet_name

string

Name of the subnet used for private SQL.

subnet

string

The Azure Subnet Name.

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

cloud_platform

aliases: cloud, csp, platform

string

The cloud provider platform for cluster creation.

When set to auto (the default), the module describes the target environment and reads its cloudPlatform field to determine which provider-specific create endpoint to call.

Set explicitly to AWS, AZURE, or PRIVATE to skip the environment describe and use the specified platform directly.

Only used when state=present and the cluster does not yet exist.

Choices:

  • "auto" ← (default)

  • "AWS"

  • "AZURE"

  • "PRIVATE"

cluster_id

aliases: id, name

string

The identifier of the Data Warehouse Cluster.

Required if state=absent and env is not specified.

credentials_path

string

If provided, the Cloudera on cloud API will use this value as its credentials path.

If not provided, the API will attempt to use the value from the environment variable CDP_CREDENTIALS_PATH.

Default: "~/.cdp/credentials"

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

If true, the module will capture the Cloudera on cloud HTTP log and return it in the sdk_out and sdk_out_lines fields.

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

endpoint

aliases: endpoint_url, url

string

The Cloudera on cloud API endpoint to use.

If not provided, the API will attempt to use the value from the environment variable CDP_ENDPOINT_URL.

Mutually exclusive with endpoint_region.

endpoint_region

aliases: cdp_endpoint_region, cdp_region, region

string

Specify the Cloudera on cloud API endpoint region.

See Cloudera Control Plane regions for more information.

If not provided, the API will attempt to use the value from the environment variable CDP_REGION.

default is an alias for the us-west-1 region.

Mutually exclusive with endpoint.

Choices:

  • "default"

  • "us-west-1" ← (default)

  • "eu-1"

  • "ap-1"

endpoint_tls

aliases: verify_endpoint_tls, verify_tls, verify_api_tls

boolean

Verify the TLS certificates for the Cloudera on cloud API endpoint.

Choices:

  • false

  • true ← (default)

env

aliases: environment, env_crn

string

The name or CRN 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

http_agent

aliases: agent_header

string

The HTTP user agent to use for Cloudera on cloud API requests.

Default: "cloudera.cloud"

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_cloud

dictionary

Options for activating an On Premise CDW Cluster.

custom_kerberos_principal_hostname

string

Custom Kerberos principal hostname for the cluster.

db_client_certificate

string

TLS client certificate contents.

Used for the mutual TLS connections between the Database Catalog and the metastore database.

db_client_key

string

TLS client private key contents.

Used for the mutual TLS connections between the Database Catalog and the metastore database.

storage_class

string

The storage class for the Local Storage Operator.

private_key

string

If provided, the Cloudera on cloud API will use this value as its private key.

If not provided, the API will attempt to use the value from the environment variable CDP_PRIVATE_KEY.

Required if access_key is provided.

private_load_balancer

boolean

Flag to set up a load balancer for private subnets.

Choices:

  • false ← (default)

  • true

profile

string

If provided, the Cloudera on cloud API will use this value as its profile.

If not provided, the API will attempt to use the value from the environment variable CDP_PROFILE.

Default: "default"

public_worker_node

boolean

Set up public facing worker nodes (AWS only).

Choices:

  • false

  • true

reserved_compute_nodes

integer

Deprecated. This parameter has no effect and will be removed in a future release.

reserved_shared_services_nodes

integer

Deprecated. This parameter has no effect and will be removed in a future release.

resource_pool

string

Deprecated. This parameter has no effect and will be removed in a future release.

state

string

The state of the Data Warehouse Cluster.

Choices:

  • "present" ← (default)

  • "absent"

strict

aliases: strict_errors

boolean

Legacy CDPy SDK error handling.

Choices:

  • false ← (default)

  • true

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

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 AWS Cluster creation (auto-detect platform from environment)
- cloudera.cloud.dw_cluster:
    env: my-environment
    aws:
      lb_subnets:
        - subnet-id-1
        - subnet-id-2
      worker_subnets:
        - subnet-id-3
        - subnet-id-4

# Request AWS Cluster creation with explicit platform
- cloudera.cloud.dw_cluster:
    env: my-environment
    cloud_platform: AWS
    aws:
      lb_subnets:
        - subnet-id-1
      worker_subnets:
        - subnet-id-2
      enable_private_eks: true
      custom_ami_id: ami-0123456789abcdef0

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

# Request Private Cloud Cluster creation
- cloudera.cloud.dw_cluster:
    env_crn: crn:cdp:environments...
    private_cloud:
      storage_class: my-storage-class

# Delete a Data Warehouse Cluster by ID
- 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...

# Force delete a Data Warehouse Cluster
- cloudera.cloud.dw_cluster:
    state: absent
    cluster_id: my-id
    force: true

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)

  • Jim Enright (@jenright)