cloudera.cloud.dw_virtual_warehouse module – Create, manage, and destroy CDP Data Warehouse Virtual Warehouses

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_virtual_warehouse.

New in cloudera.cloud 1.5.0

Synopsis

  • Create, reconcile, and delete a CDP Data Warehouse (CDW) Virtual Warehouse.

  • Supports hive, impala, and trino Virtual Warehouses.

  • Trino connector association is declarative and full-sync; the supplied set of connector ids becomes the warehouse’s complete association set. Connectors not listed are detached. At this time, an empty set is a no-op and emits a warning.

  • Reconciliation of an existing warehouse is limited to the following fields - node_count and connectors. Other creation options - tshirt_size, autoscaling, common_configs - are applied at creation time and are not reconciled.

  • The module supports check_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.

application_configs

dictionary

Configurations that are applied to specific applications in the Virtual Warehouse service.

Applied at creation only.

autoscaling

dictionary

Auto-scaling configuration for the Virtual Warehouse.

Applied at creation only; not reconciled.

auto_suspend_timeout_seconds

integer

Auto suspend threshold for the Virtual Warehouse.

disable_auto_suspend

boolean

Turn off auto suspend for the Virtual Warehouse.

Choices:

  • false

  • true

hive_desired_free_capacity

integer

Desired free capacity for Hive Virtual Warehouses.

Either autoscaling.hive_scale_wait_time_seconds or autoscaling.hive_desired_free_capacity can be provided.

hive_scale_wait_time_seconds

integer

Wait time before a scale event happens for Hive Virtual Warehouses.

Either autoscaling.hive_scale_wait_time_seconds or autoscaling.hive_desired_free_capacity can be provided.

impala_scale_down_delay_seconds

integer

Scale down threshold in seconds for Impala Virtual Warehouses.

impala_scale_up_delay_seconds

integer

Scale up threshold in seconds for Impala Virtual Warehouses.

max_nodes

integer

The maximum number of available nodes for autoscaling.

min_nodes

integer

The minimum number of available nodes for autoscaling.

pod_config_name

string

Name of the pod configuration.

catalog_id

aliases: dbc_id

string

The identifier of the parent Database Catalog attached to the Virtual Warehouse.

Required if state=present.

cluster_id

string / required

The identifier of the parent Data Warehouse Cluster of the Virtual Warehouse.

common_configs

dictionary

Configurations that are applied to every application in the Virtual Warehouse service.

Applied at creation only.

configBlocks

list / elements=dictionary

List of ConfigBlocks for the application.

content

dictionary

Contents of the ConfigBlock.

json

string

JSON type configuration.

keyValues

dictionary

Key-value type configuration.

text

string

Text type configuration.

format

string

Format of the ConfigBlock.

Choices:

  • "HADOOP_XML"

  • "PROPERTIES"

  • "TEXT"

  • "JSON"

  • "BINARY"

  • "ENV"

  • "FLAGFILE"

id

string

ID of the ConfigBlock.

Unique within an ApplicationConfig.

connectors

list / elements=string

The complete, desired set of Database Connector identifiers to associate with the Virtual Warehouse.

Only valid for trino Virtual Warehouses.

Full-sync semantics; connectors not listed are detached. An empty list is a no-op (does not yet detach all connectors) and emits a warning.

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"

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 Virtual Warehouse to achieve the declared state.

Default: 15

enable_platform_jwt_auth

boolean

Flag to configure the Virtual Warehouse to support JWTs issued by the CDP JWT token provider.

Applied at creation only.

Choices:

  • false

  • true

enable_sso

boolean

Flag to enable Single Sign-On (SSO) for the Virtual Warehouse.

Applied at creation only.

Choices:

  • false

  • true

enable_unified_analytics

boolean

Flag to enable Unified Analytics for the Virtual Warehouse.

Only valid for Impala Virtual Warehouses.

Applied at creation only.

Choices:

  • false

  • true

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)

http_agent

aliases: agent_header

string

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

Default: "cloudera.cloud"

impala_ha

dictionary

High Availability settings for an Impala Virtual Warehouse.

Applied at creation only.

enable_catalog_high_availability

boolean

Enables a backup instance for Impala catalog for high availability.

Choices:

  • false

  • true

enable_shutdown_of_coordinator

boolean

Enables a shutdown of the coordinator.

If Unified Analytics is enabled, this setting is explicitly disabled and should not be provided.

Choices:

  • false

  • true

high_availability_mode

string

Set High Availability mode.

Choices:

  • "ACTIVE_PASSIVE"

  • "ACTIVE_ACTIVE"

  • "DISABLED"

num_of_active_coordinators

integer

The number of active coordinators.

shutdown_of_coordinator_delay_seconds

integer

Delay in seconds before the shutdown of coordinator event happens.

instance_type

string

The underlying compute instance type for the Virtual Warehouse.

Applied at creation only.

ldap_groups

list / elements=string

LDAP group names enabled for authentication to the Virtual Warehouse.

Applied at creation only.

name

string

The name of the Virtual Warehouse.

Required if state=present.

Used as the lookup key when warehouse_id is not specified.

node_count

integer

The number of nodes (compute cluster size) for the Virtual Warehouse.

Reconciled on an existing warehouse.

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.

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"

state

string

The declarative state of the Virtual Warehouse.

present creates the warehouse if it does not exist, and reconciles node_count and connectors if it does.

absent deletes the warehouse if it exists (idempotent).

Choices:

  • "present" ← (default)

  • "absent"

strict

aliases: strict_errors

boolean

Legacy CDPy SDK error handling.

Choices:

  • false ← (default)

  • true

tags

dictionary

Key-value tags associated with the Virtual Warehouse cloud provider resources.

Applied at creation only.

timeout

aliases: polling_timeout

integer

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

Default: 3600

tshirt_size

aliases: template

string

The name of deployment T-shirt size, i.e. the deployment template, to use.

Applied at creation only; not reconciled on an existing warehouse.

Choices:

  • "xsmall"

  • "small"

  • "medium"

  • "large"

type

string

The type of Virtual Warehouse.

Required if state=present.

Choices:

  • "hive"

  • "impala"

  • "trino"

wait

boolean

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

If set to false, the module returns immediately.

Choices:

  • false

  • true ← (default)

warehouse_id

aliases: vw_id, id

string

The identifier of the Virtual Warehouse.

Required if state=absent.

Used as the primary lookup key; takes precedence over name.

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped.

diff_mode

Support: full

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode

platform

Platforms: all

Target OS/families that can be operated against

Examples

# Note: These examples do not set authentication details.

- name: Create a Hive Virtual Warehouse
  cloudera.cloud.dw_virtual_warehouse:
    cluster_id: example-cluster-id
    catalog_id: example-catalog-id
    name: example-hive-vw
    type: hive
    tshirt_size: xsmall

- name: Create a Trino Virtual Warehouse and associate connectors
  cloudera.cloud.dw_virtual_warehouse:
    cluster_id: example-cluster-id
    catalog_id: example-catalog-id
    name: example-trino-vw
    type: trino
    connectors:
      - connector-1783687110-gwv6
      - connector-1783688742-pqgw

- name: Reconcile the connector set (full-sync) and resize an existing warehouse
  cloudera.cloud.dw_virtual_warehouse:
    cluster_id: example-cluster-id
    catalog_id: example-catalog-id
    name: example-trino-vw
    type: trino
    node_count: 5
    connectors:
      - connector-1783687110-gwv6

- name: Delete a Virtual Warehouse
  cloudera.cloud.dw_virtual_warehouse:
    cluster_id: example-cluster-id
    warehouse_id: example-trino-vw-id
    state: absent

Return Values

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

Key

Description

sdk_out

string

Returns the captured CDP SDK log.

Returned: when debug is true

sdk_out_lines

list / elements=string

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

Returned: when debug is true

virtual_warehouse

dictionary

The details about the CDP Data Warehouse Virtual Warehouse.

Returned: always

associatedConnectors

dictionary

The connectors associated with the Virtual Warehouse, keyed by connector id.

Returned: when available

configId

string

The identifier of the Virtual Warehouse configuration.

Returned: when available

creationDate

string

The creation time of the Virtual Warehouse in UTC.

Returned: when available

creator

dictionary

Details about the Virtual Warehouse creator.

Returned: when available

dbcId

string

The Database Catalog ID associated with the Virtual Warehouse.

Returned: when available

id

string

The identifier of the Virtual Warehouse.

Returned: always

instanceType

string

The underlying compute instance type.

Returned: when available

name

string

The name of the Virtual Warehouse.

Returned: always

nodeCount

integer

The node count (compute cluster size) of the Virtual Warehouse.

Returned: when available

status

string

The status of the Virtual Warehouse.

Returned: when available

tags

list / elements=dictionary

Custom tags applied to the Virtual Warehouse.

Returned: when available

vwType

string

The Virtual Warehouse type.

Returned: always

Authors

  • Webster Mudge (@wmudge)