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

Synopsis

  • Create CDP Virtual Warehouse

Requirements

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

  • cdpy

Parameters

Parameter

Comments

application_configs

dictionary

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

__application_name__

dictionary

The application name or identifier.

configBlocks

list / elements=dictionary

List of ConfigBlocks for the specified application.

content

dictionary

Contents of a ConfigBlock.

json

string

JSON type configuration.

keyValues

dictionary

Key-value type configuration.

text

string

Text type configuration.

format

string

Format of ConfigBlock.

id

string

ID of the ConfigBlock.

Unique within an ApplicationConfig.

autoscaling

dictionary

Auto-scaling configuration for a Virtual Warehouse

auto_suspend_timeout_seconds

integer

Auto suspend threshold for Virtual Warehouse.

disable_auto_suspend

boolean

Turn off auto suspend for Virtual Warehouse.

Choices:

  • false

  • true

hive_desired_free_capacity

integer

Set Desired free capacity for Hive Virtual Wearhouses.

Either hive_scale_wait_time_seconds or hive_desired_free_capacity can be provided.

hive_scale_wait_time_seconds

integer

Set wait time before a scale event happens for Hive Virtual Wearhouses.

Either hive_scale_wait_time_seconds or hive_desired_free_capacity can be provided.

impala_scale_down_delay_seconds

integer

Scale down threshold in seconds for Impala Virtual Wearhouses.

impala_scale_up_delay_seconds

integer

Scale up threshold in seconds for Impala Virtual Wearhouses.

max_nodes

integer

The maximum number of available nodes for Virtual Warehouse autoscaling.

min_nodes

integer

The minimum number of available nodes for Virtual Warehouse 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

cdp_region

aliases: cdp_endpoint_region, endpoint_region

string

Specify the Cloudera Data Platform endpoint region.

Default: "default"

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.

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.

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

Default: 15

enable_platform_jwt_auth

boolean

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

Choices:

  • false

  • true

enable_sso

boolean

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

Choices:

  • false ← (default)

  • true

enable_unified_analytics

boolean

Flag to enable Unified Analytics for the Virtual Warehouse.

This can only be specified in the case of Impala Virtual Warehouses.

Choices:

  • false

  • true

impala_ha

dictionary

High Availability settings for a Impala Virtual Warehouse

enable_catalog_high_availability

boolean

Enables a backup instance for Impala catalog to ensure high availability.

Choices:

  • false

  • true

enable_shutdown_of_coordinator

boolean

Enables a shutdown of the coordinator.

If Unified Analytics is enabled, then 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.

ldap_groups

list / elements=string

LDAP Groupnames to enabled for authentication to the Virtual Warehouse.

name

string

The name of the Virtual Warehouse.

Required if state=present

profile

string

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

state

string

The declarative state of the Virtual Warehouse

Choices:

  • "present" ← (default)

  • "absent"

tags

dictionary

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

template

string

The name of deployment template for the Virtual Warehouse

Choices:

  • "xsmall"

  • "small"

  • "medium"

  • "large"

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

type

string

The type of Virtual Warehouse to be created.

Required if state=present

Choices:

  • "hive"

  • "impala"

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

If set to FALSE, the module will return immediately.

Choices:

  • false

  • true ← (default)

warehouse_id

aliases: vw_id, id

string

The identifier of the Virtual Warehouse.

Required if state=absent.

Examples

# Note: These examples do not set authentication details.

# Create a Virtual Warehouse
- cloudera.cloud.dw_virtual_warehouse:
    cluster_id: example-cluster-id
    name: example-virtual-warehouse
    type: hive
    template: xsmall
    autoscaling:
      min_nodes: 3
      max_nodes: 19
    tags:
       some_key: "some value"
    enable_sso: true
    ldap_groups: ['group1', 'group2', 'group3']

# Create a Virtual Warehouse with configurations
- cloudera.cloud.dw_virtual_warehouse:
    cluster_id: example-cluster-id
    name: example-virtual-warehouse
    type: "hive"
    template: "xsmall"
    enable_sso: true
    ldap_groups: ['group1','group2','group3']
    common_configs:
        configBlocks:
            - id: das-ranger-policymgr
              format: HADOOP_XML
              content:
                  keyValues:
                      'xasecure.policymgr.clientssl.truststore': '/path_to_ca_cert/cacerts'
    application_configs:
        das-webapp:
            configBlocks:
                - id: hive-kerberos-config
                  format: TEXT
                  content:
                      text: "\n[libdefaults]\n\trenew_lifetime = 7d"

# Delete a Virtual Warehouse
- cloudera.cloud.dw_virtual_warehouse:
    cluster_id: example-cluster-id
    warehouse_id: example-virtual-warehouse-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 supported

sdk_out_lines

list / elements=string

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

Returned: when supported

virtual_warehouse

dictionary

The details about the CDP Data Warehouse Virtual Warehouse.

Returned: success

creationDate

string

The creation time of the Virtual Warehouse in UTC.

Returned: always

creator

dictionary

Details about the Virtual Warehouse creator.

Returned: always

crn

string

The creator’s Actor CRN.

Returned: always

email

string

Email address (for users).

Returned: when supported

machineUsername

string

Username (for machine users).

Returned: when supported

workloadUsername

string

Username (for users).

Returned: when supported

dbcId

string

The Database Catalog ID associated with the Virtual Warehouse.

Returned: always

id

string

The identifier of the Virtual Warehouse.

Returned: always

name

string

The name of the Virtual Warehouse.

Returned: always

status

string

The status of the Virtual Warehouse.

Returned: always

tags

dictionary

Custom tags applied to the Virtual Warehouse.

Returned: always

vwType

string

The Virtual Warehouse type.

Returned: always

Authors

  • Webster Mudge (@wmudge)

  • Dan Chaffelson (@chaffelson)

  • Saravanan Raju (@raju-saravanan)