cloudera.cloud.dw_database_catalog module – Create, manage, and destroy CDP Data Warehouse Database Catalogs

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

Synopsis

  • Create, manage, and destroy CDP Data Warehouse Database Catalogs

Requirements

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

  • cdpy

Parameters

Parameter

Comments

catalog_id

aliases: id

string

The identifier of the Database Catalog.

Required if state=absent.

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 DW Cluster of the Database Catalog.

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

Default: 15

load_demo_data

boolean

Flag to load demonstration data into the Database Catalog during creation.

Choices:

  • false

  • true

name

string

The name of the Database Catalog.

Required if state=present.

profile

string

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

state

string

The operational state of the Database Catalog.

Choices:

  • "present" ← (default)

  • "absent"

timeout

aliases: polling_timeout

integer

The internal polling timeout (in seconds) while the module waits for the Data Catalog 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 Catalog to achieve the declared state.

If set to FALSE, the module will return immediately.

Choices:

  • false

  • true ← (default)

Examples

# Note: These examples do not set authentication details.

# Create Database Catalog
- cloudera.cloud.dw_database_catalog:
    name: example-database-catalog-name
    cluster_id: example-cluster-id

# Delete Database Catalog
- cloudera.cloud.dw_database_catalog:
    catalog_id: example-database-id
    cluster_id: example-cluster-id
    state: absent

Return Values

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

Key

Description

database_catalog

dictionary

Details about the Database Catalog.

Returned: always

id

string

The identifier of the Database Catalog.

Returned: always

name

string

The name of the Database Catalog.

Returned: always

status

string

The status of the Database Catalog.

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

  • Webster Mudge (@wmudge)

  • Dan Chaffelson (@chaffelson)

  • Saravanan Raju (@raju-saravanan)