From eab0ec7e6ddab82fe397720e2437892d45fa8a45 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Mon, 23 Aug 2021 17:13:12 -0400 Subject: [PATCH 01/25] Update env module to support passing in freeipa instance count (#30) Signed-off-by: Chris Perro Co-authored-by: Chris Perro --- plugins/modules/env.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/modules/env.py b/plugins/modules/env.py index 0bb9bab5..4ab858c8 100644 --- a/plugins/modules/env.py +++ b/plugins/modules/env.py @@ -842,7 +842,7 @@ def _configure_payload(self): payload['authentication'] = dict(publicKey=self.public_key_text) if self.freeipa is not None: - payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa) + payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa['instanceCountByGroup']) if self.vpc_id is not None: payload['vpcId'] = self.vpc_id @@ -875,6 +875,8 @@ def _configure_payload(self): ) payload['usePublicIp'] = self.public_ip payload['logStorage'] = dict(serviceAccountEmail=self.log_identity, storageLocationBase=self.log_location) + if self.freeipa is not None: + payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa['instanceCountByGroup']) else: # For Azure payload['securityAccess'] = dict(defaultSecurityGroupId=self.default_sg, @@ -886,6 +888,8 @@ def _configure_payload(self): payload['existingNetworkParams'] = dict( networkId=self.vpc_id, resourceGroupName=self.resource_gp, subnetIds=self.subnet_ids ) + if self.freeipa is not None: + payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa['instanceCountByGroup']) return payload @@ -928,7 +932,7 @@ def _reconcile_existing_state(self, existing): if self.description is not None and existing['description'] != self.description: mismatch.append(['description', existing['description']]) - if self.freeipa is not None and len(existing['freeipa']['serverIP']) != self.freeipa: + if self.freeipa is not None and len(existing['freeipa']['serverIP']) != self.freeipa['instanceCountByGroup']: mismatch.append(['freeipa', len(existing['freeipa']['serverIP'])]) if self.vpc_id is not None and existing['network']['aws']['vpcId'] != self.vpc_id: From 2bbea9b06e70ed355b98a47f6f5a348d1323672a Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Fri, 10 Sep 2021 12:24:21 -0400 Subject: [PATCH 02/25] Increment version and update API documentation Signed-off-by: Webster Mudge --- docs/.buildinfo | 2 +- docs/_sources/df_info.rst.txt | 2 +- docs/_sources/env.rst.txt | 535 +++++++++++++------------- docs/_static/documentation_options.js | 2 +- docs/account_auth.html | 2 +- docs/account_auth_info.html | 2 +- docs/account_cred_info.html | 2 +- docs/datahub_cluster.html | 2 +- docs/datahub_cluster_info.html | 2 +- docs/datahub_definition_info.html | 2 +- docs/datahub_template_info.html | 2 +- docs/datalake.html | 2 +- docs/datalake_info.html | 2 +- docs/datalake_runtime_info.html | 2 +- docs/df.html | 2 +- docs/df_info.html | 5 +- docs/dw_cluster.html | 2 +- docs/dw_cluster_info.html | 2 +- docs/env.html | 49 +-- docs/env_auth.html | 2 +- docs/env_auth_info.html | 2 +- docs/env_cred.html | 2 +- docs/env_cred_info.html | 2 +- docs/env_idbroker.html | 2 +- docs/env_idbroker_info.html | 2 +- docs/env_info.html | 2 +- docs/env_proxy.html | 2 +- docs/env_proxy_info.html | 2 +- docs/env_telemetry.html | 2 +- docs/env_user_sync.html | 2 +- docs/env_user_sync_info.html | 2 +- docs/freeipa_info.html | 2 +- docs/genindex.html | 2 +- docs/iam_group.html | 2 +- docs/iam_group_info.html | 2 +- docs/iam_resource_role_info.html | 2 +- docs/iam_user_info.html | 2 +- docs/index.html | 2 +- docs/ml.html | 2 +- docs/ml_info.html | 2 +- docs/ml_workspace_access.html | 2 +- docs/opdb.html | 2 +- docs/opdb_info.html | 2 +- docs/search.html | 2 +- docs/searchindex.js | 2 +- docsrc/df_info.rst | 2 +- docsrc/env.rst | 535 +++++++++++++------------- galaxy.yml | 2 +- site/conf.py | 2 +- 49 files changed, 583 insertions(+), 631 deletions(-) diff --git a/docs/.buildinfo b/docs/.buildinfo index fc183557..7a71fcdb 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 40f0495b3b7ce94d30a225fd816d2454 +config: 5bc21e0feba2ffd07ddc13514b9d709c tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_sources/df_info.rst.txt b/docs/_sources/df_info.rst.txt index df8af987..185a8c2e 100644 --- a/docs/_sources/df_info.rst.txt +++ b/docs/_sources/df_info.rst.txt @@ -44,7 +44,7 @@ Parameters | **Parameter** | **Choices/Defaults** | **Comments** | +----------------+----------------------+-----------------------------------------------------------------+ | **name** | | If a name is provided, that DataFlow Service will be described. | - | | | | + | | | Must be CDP Environment CRN or string name of DataFlow Service | | |br| | | | | | | | | ``str`` | | | diff --git a/docs/_sources/env.rst.txt b/docs/_sources/env.rst.txt index e7346137..1a84c86a 100644 --- a/docs/_sources/env.rst.txt +++ b/docs/_sources/env.rst.txt @@ -42,264 +42,264 @@ Parameters .. table:: :widths: 30 20 50 - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **Parameter** | **Choices/Defaults** | **Comments** | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **name** | | The name of the target environment. | - | | | Names must begin with a lowercase alphanumeric, contain only lowercase alphanumerics and hyphens, and be between 5 to 28 characters in length. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | |br| | | | - | | | | - | *Required* | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: environment* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **state** | **Choices:** | The declarative state of the environment | - | | - **present** |larr| | If *state=present*, one of *cloud* or *credential* must be present. | - | |br| | - started | | - | | - stopped | | - | ``str`` | - absent | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **cloud** | **Choices:** | The cloud provider or platform for the environment. | - | | - aws | Requires *region*, *credential*, *log_location*, and *log_identity*. | - | |br| | - azure | If *cloud=aws*, one of *public_key* or *public_key_id* must be present. | - | | - gcp | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | - | ``str`` | | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | - | | | If *cloud=aws*, one of *inbound_cidr* or *default_sg* and *knox_sg* must be present. | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **region** | | The cloud platform specified region | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **credential** | | The CDP credential associated with the environment | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **project** | | Name of Project when deploying environment on GCP | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **inbound_cidr** | | CIDR range which is allowed for inbound traffic. Either IPv4 or IPv6 is allowed. | - | | | Mutually exclusive with *default_sg* and *knox_sg*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: security_cidr* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **default_sg** | | Security group where all other hosts are placed. | - | | | Mutually exclusive with *inbound_cidr*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: default, default_security_group* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **knox_sg** | | Security group where Knox-enabled hosts are placed. | - | | | Mutually exclusive with *inbound_cidr*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: knox, knox_security_group* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **public_key_text** | | The content of a public SSH key. | - | | | Mutually exclusive with *public_key_id*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: ssh_key_text* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **public_key_id** | | The public SSH key ID already registered in the cloud provider. | - | | | Mutually exclusive with *public_key_text*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: public_key, ssh_key, ssh_key_id* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **log_location** | | (AWS) The base location to store logs in S3. This should be an s3a:// url. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: storage_location_base* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **log_identity** | | (AWS) The instance profile ARN assigned the necessary permissions to access the S3 storage location, i.e. *log_location*. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: instance_profile* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **network_cidr** | | (AWS) The network CIDR. This will create a VPC along with subnets in multiple Availability Zones. | - | | | Mutually exclusive with *vpc_id* and *subnet_ids*. | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **vpc_id** | | (AWS) The VPC ID. | - | | | Mutually exclusive with *network_cidr* and requires *subnet_ids*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: vpc* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **subnet_ids** | | (AWS) One or more subnet identifiers within the VPC. | - | | | Mutually exclusive with *network_cidr* and requires *vpc_id*. | - | |br| | | | - | | | | - | ``list`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: subnets* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **tags** | | Tags associated with the environment and its resources. | - | | | | - | |br| | | | - | | | | - | ``dict`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: environment_tags* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **workload_analytics** | | Flag to enable diagnostic information about job and query execution to be sent to Workload Manager for Data Hub clusters created within the environment. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **description** | | A description for the environment. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: desc* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **tunnel** | | Flag to enable SSH tunnelling for the environment. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: enable_tunnel, ssh_tunnel* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **freeipa** | | The FreeIPA service for the environment. | - | | | | - | |br| | | | - | | | | - | ``dict`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **proxy** | | The name of the proxy config to use for the environment. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: proxy_config, proxy_config_name* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **wait** | | Flag to enable internal polling to wait for the environment to achieve the declared state. | - | | | If set to FALSE, the module will return immediately. | - | |br| | | | - | | | | - | ``bool`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **delay** | | The internal polling interval (in seconds) while the module waits for the environment to achieve the declared state. | - | | | | - | |br| | | | - | | | | - | ``int`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: polling_delay* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **timeout** | | The internal polling timeout (in seconds) while the module waits for the environment to achieve the declared state. | - | | | | - | |br| | | | - | | | | - | ``int`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: polling_timeout* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **s3_guard_name** | | (AWS) AWS Dynamo table name for S3 Guard. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: s3_guard, s3_guard_table_name* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **verify_tls** | | Verify the TLS certificates for the CDP endpoint. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: tls* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **debug** | | Capture the CDP SDK debug log. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: debug_endpoints* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **profile** | | If provided, the CDP SDK will use this value as its profile. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Choices/Defaults** | **Comments** | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **name** | | The name of the target environment. | + | | | Names must begin with a lowercase alphanumeric, contain only lowercase alphanumerics and hyphens, and be between 5 to 28 characters in length. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | |br| | | | + | | | | + | *Required* | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: environment* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **state** | **Choices:** | The declarative state of the environment | + | | - **present** |larr| | If *state=present*, one of *cloud* or *credential* must be present. | + | |br| | - started | | + | | - stopped | | + | ``str`` | - absent | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **cloud** | **Choices:** | The cloud provider or platform for the environment. | + | | - aws | Requires *region*, *credential*, *log_location*, and *log_identity*. | + | |br| | - azure | If *cloud=aws*, one of *public_key* or *public_key_id* must be present. | + | | - gcp | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | + | ``str`` | | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | + | | | If *cloud=aws*, one of *inbound_cidr* or *default_sg* and *knox_sg* must be present. | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **region** | | The cloud platform specified region | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **credential** | | The CDP credential associated with the environment | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **project** | | Name of Project when deploying environment on GCP | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **inbound_cidr** | | CIDR range which is allowed for inbound traffic. Either IPv4 or IPv6 is allowed. | + | | | Mutually exclusive with *default_sg* and *knox_sg*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: security_cidr* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **default_sg** | | Security group where all other hosts are placed. | + | | | Mutually exclusive with *inbound_cidr*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: default, default_security_group* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **knox_sg** | | Security group where Knox-enabled hosts are placed. | + | | | Mutually exclusive with *inbound_cidr*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: knox, knox_security_group* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **public_key_text** | | The content of a public SSH key. | + | | | Mutually exclusive with *public_key_id*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: ssh_key_text* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **public_key_id** | | The public SSH key ID already registered in the cloud provider. | + | | | Mutually exclusive with *public_key_text*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: public_key, ssh_key, ssh_key_id* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **log_location** | | (AWS) The base location to store logs in S3. This should be an s3a:// url. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: storage_location_base* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **log_identity** | | (AWS) The instance profile ARN assigned the necessary permissions to access the S3 storage location, i.e. *log_location*. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: instance_profile* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **network_cidr** | | (AWS) The network CIDR. This will create a VPC along with subnets in multiple Availability Zones. | + | | | Mutually exclusive with *vpc_id* and *subnet_ids*. | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **vpc_id** | | (AWS) The VPC ID. | + | | | Mutually exclusive with *network_cidr* and requires *subnet_ids*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: vpc* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **subnet_ids** | | (AWS) One or more subnet identifiers within the VPC. | + | | | Mutually exclusive with *network_cidr* and requires *vpc_id*. | + | |br| | | | + | | | | + | ``list`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: subnets* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **tags** | | Tags associated with the environment and its resources. | + | | | | + | |br| | | | + | | | | + | ``dict`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: environment_tags* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **workload_analytics** | | Flag to enable diagnostic information about job and query execution to be sent to Workload Manager for Data Hub clusters created within the environment. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **description** | | A description for the environment. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: desc* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **tunnel** | | Flag to enable SSH tunnelling for the environment. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: enable_tunnel, ssh_tunnel* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **freeipa** | | The FreeIPA service for the environment. | + | | | | + | |br| | | | + | | | | + | ``dict`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **proxy** | | The name of the proxy config to use for the environment. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: proxy_config, proxy_config_name* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **wait** | | Flag to enable internal polling to wait for the environment to achieve the declared state. | + | | | If set to FALSE, the module will return immediately. | + | |br| | | | + | | | | + | ``bool`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **delay** | | The internal polling interval (in seconds) while the module waits for the environment to achieve the declared state. | + | | | | + | |br| | | | + | | | | + | ``int`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: polling_delay* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **timeout** | | The internal polling timeout (in seconds) while the module waits for the environment to achieve the declared state. | + | | | | + | |br| | | | + | | | | + | ``int`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: polling_timeout* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **endpoint_access_scheme** | **Choices:** | (AWS)The scheme for the workload endpoint gateway. PUBLIC creates an external endpoint that can be accessed over the Internet. Defaults to PRIVATE which restricts the traffic to be internal to the VPC / Vnet. Relevant in Private Networks. | + | | - PRIVATE | | + | |br| | - PUBLIC | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **endpoint_access_subnets** | | (AWS) The list of subnet IDs to use for endpoint access gateway. | + | | | | + | |br| | | | + | | | | + | ``list`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **verify_tls** | | Verify the TLS certificates for the CDP endpoint. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: tls* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **debug** | | Capture the CDP SDK debug log. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: debug_endpoints* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **profile** | | If provided, the CDP SDK will use this value as its profile. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -431,25 +431,6 @@ Common return values are documented here, the following are fields unique to thi | | | | | a_labeled_public_key | | | | | | | +-+-+----------------------------+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | | **awsDetails** | when supported | AWS-specific environment configuration information. | - | | | | | - | | |br| | | | - | | | | | - | | ``dict`` | | | - +-+-+----------------------------+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | | | **s3GuardTableName** | always | The name for the DynamoDB table backing S3Guard. | - | | | | | | - | | | |br| | | | - | | | | | | - | | | ``str`` | | | - | | | | | | - | | | | | |br| | - | | | | | | - | | | | | **Sample:** | - | | | | | | - | | | | | table_name | - | | | | | | - +-+-+----------------------------+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | | **cloudPlatform** | always | Cloud provider of the Environment. | | | | | | | | |br| | | | diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 584dfc52..d9d4c291 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '1.1.0', + VERSION: '1.4.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/account_auth.html b/docs/account_auth.html index 47e8cbb1..3458e381 100644 --- a/docs/account_auth.html +++ b/docs/account_auth.html @@ -7,7 +7,7 @@ - account_auth -- Gather and set authentication details for a CDP Account — cloudera.cloud 1.1.0 documentation + account_auth -- Gather and set authentication details for a CDP Account — cloudera.cloud 1.4.0 documentation diff --git a/docs/account_auth_info.html b/docs/account_auth_info.html index d2191519..23c60d43 100644 --- a/docs/account_auth_info.html +++ b/docs/account_auth_info.html @@ -7,7 +7,7 @@ - account_auth_info -- Gather information about CDP Account authentication settings — cloudera.cloud 1.1.0 documentation + account_auth_info -- Gather information about CDP Account authentication settings — cloudera.cloud 1.4.0 documentation diff --git a/docs/account_cred_info.html b/docs/account_cred_info.html index a4bc1f54..a7a76b30 100644 --- a/docs/account_cred_info.html +++ b/docs/account_cred_info.html @@ -7,7 +7,7 @@ - account_cred_info -- Gather information about Account prerequisites for CDP Credentials — cloudera.cloud 1.1.0 documentation + account_cred_info -- Gather information about Account prerequisites for CDP Credentials — cloudera.cloud 1.4.0 documentation diff --git a/docs/datahub_cluster.html b/docs/datahub_cluster.html index ecb5734c..474fba89 100644 --- a/docs/datahub_cluster.html +++ b/docs/datahub_cluster.html @@ -7,7 +7,7 @@ - datahub_cluster -- Manage CDP Datahubs — cloudera.cloud 1.1.0 documentation + datahub_cluster -- Manage CDP Datahubs — cloudera.cloud 1.4.0 documentation diff --git a/docs/datahub_cluster_info.html b/docs/datahub_cluster_info.html index 092522ca..3262d203 100644 --- a/docs/datahub_cluster_info.html +++ b/docs/datahub_cluster_info.html @@ -7,7 +7,7 @@ - datahub_cluster_info -- Gather information about CDP Datahubs — cloudera.cloud 1.1.0 documentation + datahub_cluster_info -- Gather information about CDP Datahubs — cloudera.cloud 1.4.0 documentation diff --git a/docs/datahub_definition_info.html b/docs/datahub_definition_info.html index 5d51585b..a759bfd3 100644 --- a/docs/datahub_definition_info.html +++ b/docs/datahub_definition_info.html @@ -7,7 +7,7 @@ - datahub_definition_info -- Gather information about CDP Datahub Cluster Definitions — cloudera.cloud 1.1.0 documentation + datahub_definition_info -- Gather information about CDP Datahub Cluster Definitions — cloudera.cloud 1.4.0 documentation diff --git a/docs/datahub_template_info.html b/docs/datahub_template_info.html index 473c204c..a5306b53 100644 --- a/docs/datahub_template_info.html +++ b/docs/datahub_template_info.html @@ -7,7 +7,7 @@ - datahub_template_info -- Gather information about CDP Datahub Cluster Templates — cloudera.cloud 1.1.0 documentation + datahub_template_info -- Gather information about CDP Datahub Cluster Templates — cloudera.cloud 1.4.0 documentation diff --git a/docs/datalake.html b/docs/datalake.html index 0c4c8651..ac393092 100644 --- a/docs/datalake.html +++ b/docs/datalake.html @@ -7,7 +7,7 @@ - datalake -- Manage CDP Datalakes — cloudera.cloud 1.1.0 documentation + datalake -- Manage CDP Datalakes — cloudera.cloud 1.4.0 documentation diff --git a/docs/datalake_info.html b/docs/datalake_info.html index c3544a2b..2df524d1 100644 --- a/docs/datalake_info.html +++ b/docs/datalake_info.html @@ -7,7 +7,7 @@ - datalake_info -- Gather information about CDP Datalakes — cloudera.cloud 1.1.0 documentation + datalake_info -- Gather information about CDP Datalakes — cloudera.cloud 1.4.0 documentation diff --git a/docs/datalake_runtime_info.html b/docs/datalake_runtime_info.html index b1476ea9..dfb09ae2 100644 --- a/docs/datalake_runtime_info.html +++ b/docs/datalake_runtime_info.html @@ -7,7 +7,7 @@ - datalake_runtime_info -- Gather information about CDP Datalake Runtimes — cloudera.cloud 1.1.0 documentation + datalake_runtime_info -- Gather information about CDP Datalake Runtimes — cloudera.cloud 1.4.0 documentation diff --git a/docs/df.html b/docs/df.html index cf83814f..820291ba 100644 --- a/docs/df.html +++ b/docs/df.html @@ -7,7 +7,7 @@ - df -- Enable or Disable CDP DataFlow Services — cloudera.cloud 1.1.0 documentation + df -- Enable or Disable CDP DataFlow Services — cloudera.cloud 1.4.0 documentation diff --git a/docs/df_info.html b/docs/df_info.html index ce415430..fb4cb16c 100644 --- a/docs/df_info.html +++ b/docs/df_info.html @@ -7,7 +7,7 @@ - df_info -- Gather information about CDP DataFlow Services — cloudera.cloud 1.1.0 documentation + df_info -- Gather information about CDP DataFlow Services — cloudera.cloud 1.4.0 documentation @@ -240,7 +240,8 @@

Parametersstr

-

If a name is provided, that DataFlow Service will be described.

+

If a name is provided, that DataFlow Service will be described. +Must be CDP Environment CRN or string name of DataFlow Service


Aliases: crn

diff --git a/docs/dw_cluster.html b/docs/dw_cluster.html index 90df0776..e34e50bc 100644 --- a/docs/dw_cluster.html +++ b/docs/dw_cluster.html @@ -7,7 +7,7 @@ - dw_cluster -- Create or Delete CDP Data Warehouse Clusters — cloudera.cloud 1.1.0 documentation + dw_cluster -- Create or Delete CDP Data Warehouse Clusters — cloudera.cloud 1.4.0 documentation diff --git a/docs/dw_cluster_info.html b/docs/dw_cluster_info.html index a320f388..d89ae0c9 100644 --- a/docs/dw_cluster_info.html +++ b/docs/dw_cluster_info.html @@ -7,7 +7,7 @@ - dw_cluster_info -- Gather information about CDP Data Warehouse Clusters — cloudera.cloud 1.1.0 documentation + dw_cluster_info -- Gather information about CDP Data Warehouse Clusters — cloudera.cloud 1.4.0 documentation diff --git a/docs/env.html b/docs/env.html index 7bece1d1..e51c0326 100644 --- a/docs/env.html +++ b/docs/env.html @@ -7,7 +7,7 @@ - env -- Manage CDP Environments — cloudera.cloud 1.1.0 documentation + env -- Manage CDP Environments — cloudera.cloud 1.4.0 documentation @@ -492,17 +492,27 @@

ParametersAliases: polling_timeout

-

s3_guard_name

+

endpoint_access_scheme


-

str

- -

(AWS) AWS Dynamo table name for S3 Guard.

+
+
Choices:
    +
  • PRIVATE

  • +
  • PUBLIC

  • +
+
+
+ +

(AWS)The scheme for the workload endpoint gateway. PUBLIC creates an external endpoint that can be accessed over the Internet. Defaults to PRIVATE which restricts the traffic to be internal to the VPC / Vnet. Relevant in Private Networks.

+ +

endpoint_access_subnets


-

Aliases: s3_guard, s3_guard_table_name

+

list

+ +

(AWS) The list of subnet IDs to use for endpoint access gateway.

-

verify_tls

+

verify_tls


bool

@@ -512,7 +522,7 @@

ParametersAliases: tls

-

debug

+

debug


bool

@@ -522,7 +532,7 @@

ParametersAliases: debug_endpoints

-

profile

+

profile


str

@@ -662,27 +672,6 @@

Return Values -

awsDetails

-


-

dict

- -

when supported

-

AWS-specific environment configuration information.

- - - -

s3GuardTableName

-


-

str

- -

always

-

The name for the DynamoDB table backing S3Guard.

-


-

Sample:

-

table_name

- - -

cloudPlatform


str

diff --git a/docs/env_auth.html b/docs/env_auth.html index 9a438ea5..81962c8e 100644 --- a/docs/env_auth.html +++ b/docs/env_auth.html @@ -7,7 +7,7 @@ - env_auth -- Set authentication details for the current CDP user — cloudera.cloud 1.1.0 documentation + env_auth -- Set authentication details for the current CDP user — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_auth_info.html b/docs/env_auth_info.html index ba405495..53ab0b91 100644 --- a/docs/env_auth_info.html +++ b/docs/env_auth_info.html @@ -7,7 +7,7 @@ - env_auth_info -- Gather information about CDP environment authentication details — cloudera.cloud 1.1.0 documentation + env_auth_info -- Gather information about CDP environment authentication details — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_cred.html b/docs/env_cred.html index d117bb74..080793a9 100644 --- a/docs/env_cred.html +++ b/docs/env_cred.html @@ -7,7 +7,7 @@ - env_cred -- Create, update, and destroy CDP credentials — cloudera.cloud 1.1.0 documentation + env_cred -- Create, update, and destroy CDP credentials — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_cred_info.html b/docs/env_cred_info.html index 3c710fe7..6d2185b8 100644 --- a/docs/env_cred_info.html +++ b/docs/env_cred_info.html @@ -7,7 +7,7 @@ - env_cred_info -- Gather information about CDP Credentials — cloudera.cloud 1.1.0 documentation + env_cred_info -- Gather information about CDP Credentials — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_idbroker.html b/docs/env_idbroker.html index 8125e3b9..71fb82ec 100644 --- a/docs/env_idbroker.html +++ b/docs/env_idbroker.html @@ -7,7 +7,7 @@ - env_idbroker -- Update ID Broker for CDP Environments — cloudera.cloud 1.1.0 documentation + env_idbroker -- Update ID Broker for CDP Environments — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_idbroker_info.html b/docs/env_idbroker_info.html index be9054a9..8c1a9ebb 100644 --- a/docs/env_idbroker_info.html +++ b/docs/env_idbroker_info.html @@ -7,7 +7,7 @@ - env_idbroker_info -- Gather information about CDP ID Broker — cloudera.cloud 1.1.0 documentation + env_idbroker_info -- Gather information about CDP ID Broker — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_info.html b/docs/env_info.html index bddc65b1..07fba19c 100644 --- a/docs/env_info.html +++ b/docs/env_info.html @@ -7,7 +7,7 @@ - env_info -- Gather information about CDP Environments — cloudera.cloud 1.1.0 documentation + env_info -- Gather information about CDP Environments — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_proxy.html b/docs/env_proxy.html index 2d1340c6..2c6d8488 100644 --- a/docs/env_proxy.html +++ b/docs/env_proxy.html @@ -7,7 +7,7 @@ - env_proxy -- Create, update, or destroy CDP Environment Proxies — cloudera.cloud 1.1.0 documentation + env_proxy -- Create, update, or destroy CDP Environment Proxies — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_proxy_info.html b/docs/env_proxy_info.html index 01594fdf..561c69de 100644 --- a/docs/env_proxy_info.html +++ b/docs/env_proxy_info.html @@ -7,7 +7,7 @@ - env_proxy_info -- Gather information about CDP Environment Proxies — cloudera.cloud 1.1.0 documentation + env_proxy_info -- Gather information about CDP Environment Proxies — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_telemetry.html b/docs/env_telemetry.html index 960df4c7..708f6ff7 100644 --- a/docs/env_telemetry.html +++ b/docs/env_telemetry.html @@ -7,7 +7,7 @@ - env_telemetry -- Set CDP environment telemetry — cloudera.cloud 1.1.0 documentation + env_telemetry -- Set CDP environment telemetry — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_user_sync.html b/docs/env_user_sync.html index 976aa0a5..4035f8d4 100644 --- a/docs/env_user_sync.html +++ b/docs/env_user_sync.html @@ -7,7 +7,7 @@ - env_user_sync -- Sync CDP Users and Groups to Environments — cloudera.cloud 1.1.0 documentation + env_user_sync -- Sync CDP Users and Groups to Environments — cloudera.cloud 1.4.0 documentation diff --git a/docs/env_user_sync_info.html b/docs/env_user_sync_info.html index c796b251..da5aadc3 100644 --- a/docs/env_user_sync_info.html +++ b/docs/env_user_sync_info.html @@ -7,7 +7,7 @@ - env_user_sync_info -- Get the status of a CDP Users and Groups sync — cloudera.cloud 1.1.0 documentation + env_user_sync_info -- Get the status of a CDP Users and Groups sync — cloudera.cloud 1.4.0 documentation diff --git a/docs/freeipa_info.html b/docs/freeipa_info.html index c9c32f74..d141dca2 100644 --- a/docs/freeipa_info.html +++ b/docs/freeipa_info.html @@ -7,7 +7,7 @@ - freeipa_info -- Gather information about FreeIPA — cloudera.cloud 1.1.0 documentation + freeipa_info -- Gather information about FreeIPA — cloudera.cloud 1.4.0 documentation diff --git a/docs/genindex.html b/docs/genindex.html index e4494ab3..746a7fd3 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -7,7 +7,7 @@ - Index — cloudera.cloud 1.1.0 documentation + Index — cloudera.cloud 1.4.0 documentation diff --git a/docs/iam_group.html b/docs/iam_group.html index 582065e0..b0ed9bd8 100644 --- a/docs/iam_group.html +++ b/docs/iam_group.html @@ -7,7 +7,7 @@ - iam_group -- Create, update, or destroy CDP IAM Groups — cloudera.cloud 1.1.0 documentation + iam_group -- Create, update, or destroy CDP IAM Groups — cloudera.cloud 1.4.0 documentation diff --git a/docs/iam_group_info.html b/docs/iam_group_info.html index 9b95e7c5..c5eeb47b 100644 --- a/docs/iam_group_info.html +++ b/docs/iam_group_info.html @@ -7,7 +7,7 @@ - iam_group_info -- Gather information about CDP Public IAM groups — cloudera.cloud 1.1.0 documentation + iam_group_info -- Gather information about CDP Public IAM groups — cloudera.cloud 1.4.0 documentation diff --git a/docs/iam_resource_role_info.html b/docs/iam_resource_role_info.html index f8286b97..4738a526 100644 --- a/docs/iam_resource_role_info.html +++ b/docs/iam_resource_role_info.html @@ -7,7 +7,7 @@ - iam_resource_role_info -- Gather information about CDP Public IAM resource roles — cloudera.cloud 1.1.0 documentation + iam_resource_role_info -- Gather information about CDP Public IAM resource roles — cloudera.cloud 1.4.0 documentation diff --git a/docs/iam_user_info.html b/docs/iam_user_info.html index c53da358..de59b565 100644 --- a/docs/iam_user_info.html +++ b/docs/iam_user_info.html @@ -7,7 +7,7 @@ - iam_user_info -- Gather information about CDP Public IAM users — cloudera.cloud 1.1.0 documentation + iam_user_info -- Gather information about CDP Public IAM users — cloudera.cloud 1.4.0 documentation diff --git a/docs/index.html b/docs/index.html index 21dbd045..991d92da 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,7 +7,7 @@ - cloudera.cloud Ansible Collection — cloudera.cloud 1.1.0 documentation + cloudera.cloud Ansible Collection — cloudera.cloud 1.4.0 documentation diff --git a/docs/ml.html b/docs/ml.html index 2b3bb64c..3499f460 100644 --- a/docs/ml.html +++ b/docs/ml.html @@ -7,7 +7,7 @@ - ml -- Create or Destroy CDP Machine Learning Workspaces — cloudera.cloud 1.1.0 documentation + ml -- Create or Destroy CDP Machine Learning Workspaces — cloudera.cloud 1.4.0 documentation diff --git a/docs/ml_info.html b/docs/ml_info.html index dbe7a6e7..f222b07b 100644 --- a/docs/ml_info.html +++ b/docs/ml_info.html @@ -7,7 +7,7 @@ - ml_info -- Gather information about CDP ML Workspaces — cloudera.cloud 1.1.0 documentation + ml_info -- Gather information about CDP ML Workspaces — cloudera.cloud 1.4.0 documentation diff --git a/docs/ml_workspace_access.html b/docs/ml_workspace_access.html index 01c83843..015e7503 100644 --- a/docs/ml_workspace_access.html +++ b/docs/ml_workspace_access.html @@ -7,7 +7,7 @@ - ml_workspace_access -- Grant and revoke user access to CDP Machine Learning Workspaces — cloudera.cloud 1.1.0 documentation + ml_workspace_access -- Grant and revoke user access to CDP Machine Learning Workspaces — cloudera.cloud 1.4.0 documentation diff --git a/docs/opdb.html b/docs/opdb.html index e585bfc3..d12ba17e 100644 --- a/docs/opdb.html +++ b/docs/opdb.html @@ -7,7 +7,7 @@ - opdb -- Create or destroy CDP OpDB Databases — cloudera.cloud 1.1.0 documentation + opdb -- Create or destroy CDP OpDB Databases — cloudera.cloud 1.4.0 documentation diff --git a/docs/opdb_info.html b/docs/opdb_info.html index ea867446..275c5801 100644 --- a/docs/opdb_info.html +++ b/docs/opdb_info.html @@ -7,7 +7,7 @@ - opdb_info -- Gather information about CDP OpDB Databases — cloudera.cloud 1.1.0 documentation + opdb_info -- Gather information about CDP OpDB Databases — cloudera.cloud 1.4.0 documentation diff --git a/docs/search.html b/docs/search.html index 88527314..533b537f 100644 --- a/docs/search.html +++ b/docs/search.html @@ -7,7 +7,7 @@ - Search — cloudera.cloud 1.1.0 documentation + Search — cloudera.cloud 1.4.0 documentation diff --git a/docs/searchindex.js b/docs/searchindex.js index 97213c23..fb672c10 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["account_auth","account_auth_info","account_cred_info","datahub_cluster","datahub_cluster_info","datahub_definition_info","datahub_template_info","datalake","datalake_info","datalake_runtime_info","df","df_info","dw_cluster","dw_cluster_info","env","env_auth","env_auth_info","env_cred","env_cred_info","env_idbroker","env_idbroker_info","env_info","env_proxy","env_proxy_info","env_telemetry","env_user_sync","env_user_sync_info","freeipa_info","iam_group","iam_group_info","iam_resource_role_info","iam_user_info","index","ml","ml_info","ml_workspace_access","opdb","opdb_info"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["account_auth.rst","account_auth_info.rst","account_cred_info.rst","datahub_cluster.rst","datahub_cluster_info.rst","datahub_definition_info.rst","datahub_template_info.rst","datalake.rst","datalake_info.rst","datalake_runtime_info.rst","df.rst","df_info.rst","dw_cluster.rst","dw_cluster_info.rst","env.rst","env_auth.rst","env_auth_info.rst","env_cred.rst","env_cred_info.rst","env_idbroker.rst","env_idbroker_info.rst","env_info.rst","env_proxy.rst","env_proxy_info.rst","env_telemetry.rst","env_user_sync.rst","env_user_sync_info.rst","freeipa_info.rst","iam_group.rst","iam_group_info.rst","iam_resource_role_info.rst","iam_user_info.rst","index.rst","ml.rst","ml_info.rst","ml_workspace_access.rst","opdb.rst","opdb_info.rst"],objects:{},objnames:{},objtypes:{},terms:{"00b58f27be":27,"00b58f27be4e7ab9f":[7,8],"00f2":[14,21],"01234":[14,21],"012345":[14,21],"04a332603a269535f":[14,21],"07bbea553ca667b66":[14,21],"08785c81e888251df":[14,21],"0aad7d6d9aa66d1e7":[14,21],"0e9bc67a":[25,26],"100":[3,7],"1111104421142":7,"1234":19,"1602080301000":[25,26],"168":10,"192":10,"19t15":[33,34],"1a0f05edc010":[22,23],"2020":[7,8,15,28,29,31],"2021":[33,34],"226a":[14,17,18,21],"240":[7,8],"2xlarg":33,"311d51259233":[14,17,18,21,22,23],"32b18f82":2,"3600":10,"381358652250":[14,21],"3875500000000":2,"38eeb2b9":[14,21],"38fe":[22,23],"414f":2,"41b5":31,"4275":[25,26],"4357":[14,17,18,21,22,23],"4844562":[7,8],"4958":[14,21],"4be7":[14,17,18,21],"4c2d":31,"4c3c":[22,23],"4d10":[14,21],"531000":[28,29,31],"558bc1d2":[14,17,18,21,22,23],"56789":[14,21],"61eb5b97":[14,17,18,21],"654468598544":19,"6e57":[14,21],"6f7cc06b4937":[14,21],"784255c25b7d":31,"795d18a043b5":[14,17,18,21],"808000":31,"8194":[22,23],"8443":[14,21,22,23],"847000":[7,8],"8524":[14,17,18,21,22,23],"8867":[14,17,18,21,22,23],"8xlarg":33,"90c1":[14,21],"92e9":31,"935c":[25,26],"981304421142":[14,17,32],"997000":[33,34],"boolean":[33,34],"case":[3,7,15,28],"default":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],"export":[33,34],"function":32,"int":[0,1,3,4,7,10,11,12,14,17,22,23,25,33,34,36],"new":[14,19],"public":[10,12,14,21,33],"true":[10,21],"var":32,"while":[3,7,10,12,14,25,33,36],AWS:[2,3,7,8,12,14,17,18,19,20,21,32,33,35],For:[17,19,32,35],GCS:7,IDs:[12,16],NFS:33,Not:[19,20],One:14,TLS:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],The:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],These:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],__datalak:[19,20],__my_teardown_request:10,__subnetid__:[14,21],_admin:31,_environ:16,_workload:16,a_labeled_public_kei:[14,21],aaaab3nzac:[14,21],abcd:[14,19,21],abf:[14,21],abl:0,about:[0,3,7,10,12,14,28,33,35,36],absent:[3,7,10,12,14,17,22,28,33,35,36],access:[7,8,14,17,19,20,21,32,33,34],access_output:35,accessor:19,accessorcrn:[19,20],account:[7,14,17,18,19,21,31,32],account_id:2,accountadmin:31,achiev:[3,7,10,12,14,25,33,36],activ:[10,11],activeerroralertcount:[10,11],activewarningalertcount:[10,11],actor:[12,13,19,20],ad91:[14,21],added:6,addit:[14,21],address:[12,13,14,21,31],adl:7,admin:[0,7],administr:[0,28,31],aedc:2,affect:[0,15],after:0,alert:[10,11],alias:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],all:[0,4,5,6,8,9,11,13,14,15,16,18,19,20,21,23,25,26,28,29,30,31,32,33,34,37],allow:[14,21,33],along:14,alphabet:28,alphanumer:[14,28],alreadi:14,also:[19,20,32],altu:[19,30],alwai:[0,1,2,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37],analyt:24,ani:[3,7,19,20,27,29],anoth:[14,19,25],ansibl:15,api:[7,8,10,32],appli:[33,34],applic:[10,11,17,33,34],applicationid:17,arbitrari:[3,7,14],arn:[7,14,17,18,19,20,21,32,35],arrai:[3,4,18,33,34],asset:32,assign:[14,28,29,30],associ:[3,7,8,14,19,20,21,28,29],assum:[7,32],async:10,atla:[7,8,33,34],atlas_api:[7,8],atlas_serv:[7,8],attach:[3,7],attachedvolumeconfigur:3,audit:[14,19,20,21],authent:[2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],authorized_ip_rang:10,authorizediprang:[10,11],autom:32,autosc:33,avail:[9,14,21,24,33,34],availabilityzon:[14,21,33,34],aws:[2,7,14,17,19,21,32],aws_private_subnet:12,aws_public_subnet:12,awsconfigur:[7,8],awsdetail:[14,21],az_enable_az:12,az_subnet:12,azur:[2,3,7,8,12,14,17,19,20,21,32,33],azureconfigur:[7,8],azuredetail:[14,21],b308:[25,26],b3ee137560e3:2,b56d:[14,17,18,21],b8c764dc13be:[25,26],back:[14,21,33],backward:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],balanc:[10,33],barbazgaz:22,base64:[2,16],base:[7,14,21],basedomain:[33,34],basic:[4,5,6,8,9,11,13,21,23,31,34,37],been:0,befor:32,begin:14,being:[17,33,34],belong:31,below:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33,34,35,36,37],best:32,between:[3,7,14,17],blob:[14,21],block:33,bool:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],both:24,bring:[19,20],broker:[7,8],bucket:[7,14,21,32],can:[3,7,14,28,31,32,33,34],captur:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],catalog:3,catalognam:[3,4],catalogurl:[3,4],cbab8ee3:[14,21],cdh7:[7,8],cdp:[27,32],cdp_profil:25,cdpy:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33,34,35,36,37],cert:16,certif:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],chaffelson:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,36,37],chang:[0,3,7,14],charact:[3,7,14,15,28],check:[33,34],check_mod:[0,1,2,15,16,17,18,19,20,25,26],choic:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],chri:[3,5],christian:21,cidr:[14,21,33],classifi:[10,11],clear:19,clear_map:19,cleroi:21,cli:32,clone:32,cloud:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],cloudbreak:[14,21],cloudera:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],clouderamanag:[3,4,7,8],clouderamanagerrepositoryurl:[7,8],clouderamanagerserverurl:[7,8],clouderassologinen:[0,1],cloudplatform:[3,4,5,7,8,10,11,12,13,14,17,18,21,33,34],cluster:[3,4,7,10,11,14,19,20,21,31,33,34,36,37],clusterbasedomain:[33,34],clusterdefinitionnam:5,clusterid:[10,11],clusternam:[3,4],clusterstatu:[3,4],clustertemplatecont:6,clustertemplatecrn:[3,4],clustertemplatenam:6,cmperro:[3,5],code:[14,21],collect:[24,28],collection_path:32,com:[14,21,22,23,32],combin:15,comment:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],common:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],commun:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],compar:31,compat:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],complet:[7,14,19,20,25,26,33],complex:[14,17,18,21,25,26],config:[14,21,22,23],configur:[7,8,14,21,22,23,32,33],conflict:15,conform:17,connect:[10,32],consist:17,consol:32,constrain:[4,8],contain:[3,7,14,21,28,33,34],content:[3,5,6,7,14,32],contributor:[14,21],control:[14,21],core:[14,21],count:[5,6,10,11],cpu_set:33,creat:[2,3,7,8,10,13,14,19,21,27,29,31,34],create_fail:[14,21],creation:[3,12,13,17,18,33,34,36,37],creation_initi:[14,21],creationd:[3,4,7,8,12,13,28,29,31,33,34,36,37],creator:[12,13,33,34,36,37],creatorcrn:[33,34,36,37],credenti:[7,8,14,21,22,23,32],credentialcrn:[3,4,7,8],credentialnam:[14,17,18,21],crn:[3,4,5,6,7,8,10,11,12,13,14,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,36,37],crn__:[19,20],cross:[2,17,18],csa1:[7,8],current:[10,11,16,25,31,33,34],current_us:[25,31],custom:[31,33],dai:[0,1],dan:[0,1,2,4,5,6,7,8,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,28,29,30,31,33,34,36,37],daniel:[3,17,26],data:[7,14,19,20,21,32],data_access:19,data_access_arn:19,dataaccessrol:[19,20],databas:[10,21,33],database_config:33,databasenam:[36,37],dataengin:5,datahub:21,datahub_tag:3,datalak:[3,14,19,20,21,25,32],datalake_info:7,datalake_tag:7,datalakecrn:[3,4],datalakenam:[7,8],datamart:5,datawarehous:21,date:[19,20,28,29,31,33,34],dbversion:[36,37],debug:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],debug_cdpsdk:1,debug_endpoint:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],declar:[3,7,10,12,14,16,25,32,33,35,36],default_security_group:14,default_set:33,default_sg:14,defaultruntimevers:9,defaultsecuritygroupid:[14,21],defin:[0,22,25,31],definit:[2,3],definition_cont:5,delai:[3,7,10,12,14,17,25,33,36],delet:[3,7,14,17,19,22,28,33],demand:[10,11],depend:10,deploi:[10,12,14,33,34],deploy:[10,11,14,21,24,33],deploymentcount:[10,11],deriv:[17,18],desc:[14,17],descend:21,describ:[4,5,6,8,11,13,18,21,23,25,26,27,34,37],descript:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],design:[0,2,9],desir:33,detail:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],dflocalurl:[10,11],dfs:[14,21],diagnost:14,dict:[0,1,2,3,4,6,7,8,10,11,12,13,14,16,19,20,21,22,27,28,31,33,35,36],dictat:[5,6],dictionari:[2,16,18],digit:15,disabl:[0,28],disable_sso:0,discovery_data_and_explor:5,displaynam:[3,4,7,8],document:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],doe:[19,20],domain:[7,8,14,21],don:[7,14,19],drop:36,dure:[10,17,18,33,34],dwadmin:30,dwuser:30,dynamo:14,dynamodb:[14,21],each:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],easiest:32,east:[14,21,32],eb6c5fc8:[22,23],efghi:19,either:[14,21,28],email:[7,12,13,31],empti:[18,19,33,34],enabl:[0,1,3,7,11,12,14,19,21,33,34,36],enable_cloudera_sso:0,enable_govern:33,enable_metr:33,enable_monitor:33,enable_public_loadbalanc:33,enable_sso:0,enable_tl:33,enable_tunnel:14,encod:16,encount:27,end:[25,26],enddat:[19,20],endpoint:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],endpointpublicaccess:[33,34],endtim:[25,26],enright:27,ensur:32,entiti:10,entri:[3,7,8],env:[3,4,7,8,12,13,32,33,34,35,36,37],env_crn:[10,12],env_info:[14,22,32],env_stop:[14,21],environ:[3,4,7,8,10,11,12,13,15,17,18,20,26,27,32,33,34,35,36,37],environment_tag:14,environmentcrn:[3,4,7,8,12,13,25,26,27,33,34,36,37],environmentnam:[14,21,27,33,34,36,37],epoch:[25,26],error:[1,10,11,15,17,19,20,25,26,33],errordetail:[19,20],especi:21,establish:17,even:33,event:[25,26],eventu:17,exampl:32,example_loc:[14,21],exclus:[14,19,25,31],execut:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33,34,35,36,37],exist:[19,32,33],existing_databas:33,existing_nf:33,experi:[21,32],expir:[0,1],explan:[7,8],expos:[7,8],extern:[14,21],external_database_creation_in_progress:[7,8],external_database_deletion_in_progress:[7,8],external_database_start_in_progress:[7,8],external_database_stop_in_progress:[7,8],external_id:2,f2e7cd8a:31,f6d9bceecb54:[14,21],f868:2,fail:[3,7,17,19,20,25,26],failur:[25,26,33,34],failuremessag:[33,34],fals:[3,7,10,12,14,33,36],featur:[10,11],field:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],file:[17,32,35],filesystem:[33,34],filesystemid:[33,34],filter:31,find:[4,8,13,34,36,37],first:[28,31],firstnam:31,flag:[0,1,3,5,6,7,8,9,10,12,14,15,16,19,20,21,24,28,29,31,33,34,36],flink:[7,8],flow_manag:5,follow:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],foo:22,forc:[3,7,22,33],force_delet:33,format:[17,32],found:[18,21,29],fqcn:32,fqdn:[3,4],freeipa:[14,16,21],freeipa_creation_in_progress:[14,21],freeipa_delete_in_progress:[14,21],freeipa_deleted_on_provider_sid:[14,21],fresh:19,friendli:[7,8],from:[1,2,3,7,16,17,18,33,34],full:28,fulli:[19,32],galaxi:32,gatewai:3,gather_fact:32,gcp:[3,7,14,17,19,21],gcpconfigur:7,gener:[3,4,25,26,33,34],git:32,given:[8,14,16,21],globalstatu:[19,20],googl:[17,21],govern:[16,33,34],governanceen:[33,34],gpu_set:33,grant:[28,29],group:[3,6,7,8,14,19,20,21,30,32,33,34],group_nam:[28,29],groupnam:[28,29],guarante:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],guard:14,has:[0,19,33,34],have:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],hbase:[36,37],health:[33,34],healthi:[7,8],healthinfo:[33,34],healthinfolist:[33,34],heartbeat:[33,34],help:32,here:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],high:[10,11],host:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,32,33,34,35,36,37],hostnam:[14,21,27,33],http:[7,8,14,21,22,23,32,33,34],httpsenabl:[33,34],hub:14,hue:[36,37],hueendpoint:[36,37],hyphen:[3,7,14,17],iam:[7,14,17,19,21,32],iam_info:31,idbrok:[7,8,19,20],ident:[7,8,14,21,31],identifi:[2,7,8,14,19,21,27,28,31,35],identiti:[19,20],identityprovidercrn:31,ignor:[15,19],imag:[3,4],imagedetail:[3,4],immedi:[3,7,10,12,14,17,33,36],impact:28,inbound:[14,21],inbound_cidr:[14,32],includ:[6,19,20,32],indic:[0,1,3,7,10,16,19,20,28,29,33,34],individu:[19,20],info:[33,34],inform:[0,3,7,10,12,14,28,33,35,36],initi:[33,34],instal:[2,19,33,34],instanc:[3,6,7,8,10,11,14,21,27,32,33,34],instance_profil:[7,14],instancecount:[33,34],instancegroup:[3,4,7,8,33,34],instancegroupcount:6,instancegroupnam:[3,33,34],instancegrouptyp:3,instanceid:[33,34],instancenam:[33,34],instanceprofil:[7,8,14,21],instancestatu:[33,34],instanceti:33,instancetyp:[3,10,11,33,34],instanceurl:[33,34],integr:33,interact:[0,1,31,32],interfac:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],intern:[3,7,10,12,14,25,33,36,37],internalnam:[36,37],interv:[3,7,10,12,14,25,33,36],ip_address:33,ip_rang:10,ipaserv:[14,21],ipaserver0:27,ips:[33,34],ipv4:[14,21],ipv6:[14,21],ishealthi:[33,34],issu:27,its:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],jenright:27,jim:27,job:14,json:[5,6],k8s:[33,35],k8s_request:33,k8sclusternam:[33,34,37],k8snodecount:[10,11],kei:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],keytab:16,knox:[7,8,14,21],knox_security_group:14,knox_sg:14,knoxservic:[3,4,7,8],kubeconfig:35,kubernet:[10,11,33,34,37],lab:32,larg:21,last:31,lastinteractivelogin:31,lastnam:31,learn:[21,34],length:14,leroi:21,letter:[3,7,17],level:1,lifetim:[0,1],light_duti:7,line:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],linger:[3,7],list:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],load:[10,33],loadbalanc:[33,34],loadbalancer_access_ip:33,loadbalanceripwhitelist:[33,34],local:[10,11,32],localhost:32,locat:[7,14,21,36,37],log:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],log_ident:[14,32],log_loc:[14,32],log_rol:[14,21],logger:[14,21],loggerident:[14,21],login:[0,1,31],loginusernam:[14,21],logs_collect:24,logstorag:[14,21],lower:15,lowercas:[3,7,14,17],lowest:10,machin:[12,13,21,28,34],machineusernam:[12,13],mai:[10,11,21],main:32,maintain:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],manag:[8,21,32,33],managedident:[7,8,14,21],manual:[3,7],map:[19,20],mappingsvers:[19,20],master:3,match:31,max:[0,1],max_k8s_node_count:10,maximum:[0,10,11,28,33,34],maxinst:[33,34],maxk8snodecount:[10,11],maxpasswordlifetimedai:[0,1],medium_duty_ha:7,member:[28,29],membership:[28,29],messag:[10,11,25,26,33,34],metadata:[14,21],metric:[33,34],microsoft:[14,21],might:[33,34],min_k8s_node_count:10,minimum:[10,11,15,33,34],mininst:[33,34],mink8snodecount:[10,11],minut:14,ml_workspace_acc:35,mode:[3,4,7,8,12],model:[33,34],modelmetricsen:[33,34],modul:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],monitor:[33,34],monitoringen:[33,34],more:[12,14,15,21,25,26],most:[19,20,33,34],mount:33,mudg:[0,1,2,3,4,5,6,7,8,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37],multipl:[14,16,25],must:[3,7,13,14,15,17,19,28,32,34,36,37],mutual:[14,19,25,31],name:[3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],name_:16,namespac:32,necessari:[14,21,32],need:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,32,33,34,35,36,37],net:[14,21],network:[14,21],network_cidr:[14,32],networkcidr:[14,21],networkid:[14,21],networknam:21,networksecuritygroup:[14,21],never:[0,1],never_run:[19,20,25,26],nfs:33,nfs_version:33,no_log:15,node:[5,10,11,14,21,33,34],nodecount:[3,4,5],nodes_max:10,nodes_min:10,non:[0,14,21],notabl:16,note:[0,1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],now:19,nsg:[14,21],number:[3,7,9,10,11,17,33,34],object:[17,18,21,25,26,33,34],occur:[33,34],odus:30,off:[24,33],omit:[19,20],on_demand:33,onc:19,one:[14,15,16,25,26,32],onli:[0,3,7,9,14,16,17,21,28,33],onlin:32,opdb:21,open:[3,4,7,8],oper:[17,19,20,21,25,26,33],operationaldatabas:5,operationid:[25,26],operations_id:26,operationtyp:[25,26],option:[3,4,7,8],other:[0,14,21,32],otherwis:9,output:[17,32,35],overal:[19,20],pair:[31,33,34],pam:[7,8],parent:[10,11],particular:14,password:[0,1,14,15,21,22],password_lifetim:0,path:[7,17,33],period:17,permiss:[14,21],perro:[3,5],persist:10,pip:32,place:[14,36],platform:[10,11,12,13,14,32,33,34],platformvers:[3,4],pleas:32,polici:[0,1,2],poll:[3,7,10,12,14,25,33,36],polling_delai:[3,7,10,12,14,25,33,36],polling_timeout:[3,7,10,12,14,25,33,36],port:[14,21,22,23],possibl:17,postgr:33,practic:32,present:[3,7,10,12,14,17,19,20,22,25,28,32,33,35,36],preview:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],privat:[12,14,21,33],privateip:[3,4],product:[5,6,7,8],productvers:[5,6,7,8],profil:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],project:[3,7,14,21,32],protocol:[14,21,22,23,33],provid:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],provis:[10,11,32,33,34],provision_k8:33,provisioning_fail:[7,8],proxi:[14,21],proxy_config:14,proxy_config_nam:14,proxy_usernam:[22,23],proxyconfig:[14,21],proxyconfignam:[14,21,22,23],public_kei:14,public_key_id:[14,32],public_key_text:14,public_loadbalanc:[10,33],publicip:[3,4],publickei:[14,21],publickeyid:[14,21],publicli:[33,34],purg:28,qualifi:[19,32],queri:[14,16],rang:[10,11,14,21],ranger:[19,20],ranger_audit:19,ranger_audit_arn:19,ranger_cloud_access:19,ranger_cloud_access_arn:19,rangerauditrol:[19,20],rangercloudaccessauthorizerrol:[19,20],raz:[19,20],reach:7,recent:[19,20,33,34],recipenam:3,record:[10,28,29,31],recoverymod:3,refer:32,referenc:[33,34],regex:31,region:[7,8,10,11,14,21,32],regist:[10,14,21,32,35],reject:[19,20,25,26],relat:[7,8,10],remov:[3,7,10,33,36],remove_storag:33,replac:28,report_deployment_log:24,repositori:[7,8,32],request:[7,8,12,19,20,21,25,26,33],reserv:28,resolv:21,resourc:[3,7,14,19,20,21,28,29,32,33,34],resource_rol:[28,29,30],resourcecrn:[28,29],resourcegroup:[14,21],resourcegroupnam:[14,21],resourcenam:[33,34],resourcerol:30,resourcerolecrn:[28,29],result:32,retain:10,retri:17,retriev:[13,16,34,37],return_cont:6,right:[28,29,30],role:[7,14,17,18,19,20,21,28,29,32],role_arn:17,root:16,root_ca:16,root_certif:16,rootvolum:33,rootvolumes:3,rsa:[14,21],run:[7,8,19,20,25,26],runtim:7,runtimevers:9,s3_guard:14,s3_guard_nam:14,s3_guard_table_nam:14,s3a:[7,14,21,32],s3guard:[14,21],s3guardtablenam:[14,21],saml:0,sampl:[2,5,6,7,8,9,14,17,18,19,20,21,22,23,25,26,27,28,29,31,33,34],scale:[7,10,11],sdk:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],sdk_out:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],sdk_out_lin:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],second:[3,7,10,12,14,17,25,26,33,36],secret:17,secret_password:[14,21],secur:[14,21],security_cidr:14,securityaccess:[14,21],securitygroupidforknox:[14,21],see:[7,14,32],select:[15,16],sensit:[3,7,28],sent:14,server:[7,8,10,27,33],serverip:[14,21],servic:[3,7,8,14,17,19,20,21],serviceaccountemail:7,servicenam:[3,4,7,8],serviceurl:[3,4,7,8],set:[2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37],set_empty_map:19,setup:33,sever:[14,29,30],sharedprojectid:21,should:[3,7,14,15,19,21],show:[33,34],sign:[7,8],simpl:32,singl:[7,8,16,25,28,29,30,31],site:[14,21,27],situat:[10,11],size:33,slow:21,some:[7,8,14,17,19,20,21,35],special:15,specif:[2,7,8,14,21,35],specifi:[3,5,6,14,15,16,24,27,28],ssh:[14,21],ssh_kei:14,ssh_key_id:14,ssh_key_text:14,ssh_tunnel:14,sshkei:[14,32],sso:[0,1,7,8],stabl:31,stack:10,stack_creation_in_progress:[7,8],stack_deletion_in_progress:[7,8],start:[3,7,14,19,20,25,26],start_freeipa_fail:[14,21],start_in_progress:[7,8],startdat:[19,20],starttim:[25,26],state:[3,4,7,8,10,11,12,14,17,22,25,27,28,32,33,35,36],statement:31,statment:31,status:[19,20],statusreason:[3,4,7,8,14,21],stop:[7,8,14],stop_freeipa_start:[14,21],stop_in_progress:[7,8],storag:[7,14,21,33,36,37],storage_loc:7,storage_location_bas:[7,14],storageloc:[36,37],storagelocationbas:[14,21],store:[14,21,33],str:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],stream:5,strict:15,string:[2,14,16,21,35],subnet:[3,12,14,21],subnet_id:14,subnetid:[14,21],subnetmetadata:[14,21],subnetnam:[14,21],subscript:[14,17,21],succeed:[25,26],success:[3,4,5,6,7,8,9,14,17,19,20,21,22,23,25,26,27,28,29,30,31,35],summari:[19,20],support:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],sync:[19,20,28,29],sync_map:19,sync_membership:28,sync_on_login:28,synchron:[25,26],syncmembershiponuserlogin:[28,29],syncneed:[19,20],syncstatu:[19,20],tabl:[14,21],table_nam:[14,21],tag:[3,6,7,14,32,33,34],take:14,target:[12,14,15,16,17,24],task:32,technic:[10,11],templat:[3,5],template_cont:6,tenant:17,termin:[19,20],text:17,than:15,the_usernam:[14,21],thi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],time:[12,13,17,33,34,36,37],timedout:[19,20,25,26],timeout:[3,7,10,12,14,25,33,36],timestamp:[7,8,25,26,33,34],tktk:[3,4],tls:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],traffic:[14,21],tunnel:14,turn:[24,33],two:[15,16],txt:32,type:[3,5,10,11,25,26,32,33,34],u_023:31,under:[10,11],underli:1,underscor:28,uniqu:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],unix:[33,34],updat:[0,14,15],updatedat:[33,34],upper:15,uri:[7,12,17],url:[7,8,10,11,14,33,34],usag:[33,34],use:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],use_public_load_balanc:10,used:[3,7,8,12,13,16,17,18,31,32,33,34],usepublicip:[14,21],user:[0,7,8,12,13,14,16,19,20,21,22,23,28,29,32,33,34],user_keytab:16,user_manag:6,user_nam:31,user_sync:[25,26],usera:16,userassignedident:[14,21],userb:16,userid:31,usernam:[12,13,16,31],username_:16,uses:[33,34],using:[0,1,2,11,13,18,32,34,37],utc:[12,13,36,37],uuid:[3,25,26],variou:32,veri:21,verifi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],verify_tl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],version:[3,4,5,6,7,8,9,19,20,32,33,34,36,37],via:32,vnet:[14,21],volum:3,volumecount:3,volumes:3,volumetyp:3,vpc:[14,21],vpc_id:14,vpcid:[14,21],wai:32,wait:[3,7,10,12,14,25,33,36],warn:[10,11],webster:[0,1,2,3,4,5,6,7,8,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37],well:[3,7,32],west:[14,17,18,19,21,22,23,30],when:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],where:[14,31],whether:[0,1,10,12,16,19,20,28,29,31],which:[3,4,7,8,13,14,17,19,20,21,28,29,32,34,36,37],whitelist:[33,34],who:0,window:[14,21],within:[14,15,21],wmudg:[0,1,2,3,4,5,6,7,8,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37],work:32,workdloadtyp:[3,4],workload:[0,1,5,14,15,16,24,31],workload_analyt:[14,24],workload_password:15,workload_password_lifetim:0,workloadpasswordpolici:[0,1],workloadtempl:5,workloadusernam:[12,13,31],workspac:21,workspace_crn:34,wrapper:32,write:[19,20],yes:[0,6,9,10,12,16,17,19,25,28,31,33],yml:32,you:32,zero:[12,21],zone:[14,21,33,34]},titles:["account_auth -- Gather and set authentication details for a CDP Account","account_auth_info -- Gather information about CDP Account authentication settings","account_cred_info -- Gather information about Account prerequisites for CDP Credentials","datahub_cluster -- Manage CDP Datahubs","datahub_cluster_info -- Gather information about CDP Datahubs","datahub_definition_info -- Gather information about CDP Datahub Cluster Definitions","datahub_template_info -- Gather information about CDP Datahub Cluster Templates","datalake -- Manage CDP Datalakes","datalake_info -- Gather information about CDP Datalakes","datalake_runtime_info -- Gather information about CDP Datalake Runtimes","df -- Enable or Disable CDP DataFlow Services","df_info -- Gather information about CDP DataFlow Services","dw_cluster -- Create or Delete CDP Data Warehouse Clusters","dw_cluster_info -- Gather information about CDP Data Warehouse Clusters","env -- Manage CDP Environments","env_auth -- Set authentication details for the current CDP user","env_auth_info -- Gather information about CDP environment authentication details","env_cred -- Create, update, and destroy CDP credentials","env_cred_info -- Gather information about CDP Credentials","env_idbroker -- Update ID Broker for CDP Environments","env_idbroker_info -- Gather information about CDP ID Broker","env_info -- Gather information about CDP Environments","env_proxy -- Create, update, or destroy CDP Environment Proxies","env_proxy_info -- Gather information about CDP Environment Proxies","env_telemetry -- Set CDP environment telemetry","env_user_sync -- Sync CDP Users and Groups to Environments","env_user_sync_info -- Get the status of a CDP Users and Groups sync","freeipa_info -- Gather information about FreeIPA","iam_group -- Create, update, or destroy CDP IAM Groups","iam_group_info -- Gather information about CDP Public IAM groups","iam_resource_role_info -- Gather information about CDP Public IAM resource roles","iam_user_info -- Gather information about CDP Public IAM users","cloudera.cloud Ansible Collection","ml -- Create or Destroy CDP Machine Learning Workspaces","ml_info -- Gather information about CDP ML Workspaces","ml_workspace_access -- Grant and revoke user access to CDP Machine Learning Workspaces","opdb -- Create or destroy CDP OpDB Databases","opdb_info -- Gather information about CDP OpDB Databases"],titleterms:{"public":[29,30,31],"return":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],Using:32,about:[1,2,4,5,6,8,9,11,13,16,18,20,21,23,27,29,30,31,34,37],access:35,account:[0,1,2],account_auth:0,account_auth_info:1,account_cred_info:2,ansibl:32,authent:[0,1,15,16],author:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],broker:[19,20],cdp:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],cdpy:32,cloud:32,cloudera:32,cluster:[5,6,12,13],collect:32,creat:[12,17,22,28,33,36],credenti:[2,17,18],current:15,data:[12,13],databas:[36,37],dataflow:[10,11],datahub:[3,4,5,6],datahub_clust:3,datahub_cluster_info:4,datahub_definition_info:5,datahub_template_info:6,datalak:[7,8,9],datalake_info:8,datalake_runtime_info:9,definit:5,delet:12,destroi:[17,22,28,33,36],detail:[0,15,16],develop:32,df_info:11,disabl:10,dw_cluster:12,dw_cluster_info:13,enabl:10,env:14,env_auth:15,env_auth_info:16,env_cr:17,env_cred_info:18,env_idbrok:19,env_idbroker_info:20,env_info:21,env_proxi:22,env_proxy_info:23,env_telemetri:24,env_user_sync:25,env_user_sync_info:26,environ:[14,16,19,21,22,23,24,25],exampl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],freeipa:27,freeipa_info:27,from:32,gather:[0,1,2,4,5,6,8,9,11,13,16,18,20,21,23,27,29,30,31,34,37],get:26,github:32,grant:35,group:[25,26,28,29],iam:[28,29,30,31],iam_group:28,iam_group_info:29,iam_resource_role_info:30,iam_user_info:31,inform:[1,2,4,5,6,8,9,11,13,16,18,20,21,23,27,29,30,31,32,34,37],instal:32,learn:[33,35],librari:32,machin:[33,35],manag:[3,7,14],ml_info:34,ml_workspace_access:35,more:32,note:[10,11],opdb:[36,37],opdb_info:37,paramet:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],playbook:32,prerequisit:2,proxi:[22,23],python:32,requir:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,32,33,34,35,36,37],resourc:30,revok:35,role:30,run:32,runtim:9,servic:[10,11],set:[0,1,15,24],statu:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],sync:[25,26],synopsi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],telemetri:24,templat:6,test:32,updat:[17,19,22,28],usag:32,user:[15,25,26,31,35],valu:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],warehous:[12,13],workspac:[33,34,35],your:32}}) \ No newline at end of file +Search.setIndex({docnames:["account_auth","account_auth_info","account_cred_info","datahub_cluster","datahub_cluster_info","datahub_definition_info","datahub_template_info","datalake","datalake_info","datalake_runtime_info","df","df_info","dw_cluster","dw_cluster_info","env","env_auth","env_auth_info","env_cred","env_cred_info","env_idbroker","env_idbroker_info","env_info","env_proxy","env_proxy_info","env_telemetry","env_user_sync","env_user_sync_info","freeipa_info","iam_group","iam_group_info","iam_resource_role_info","iam_user_info","index","ml","ml_info","ml_workspace_access","opdb","opdb_info"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["account_auth.rst","account_auth_info.rst","account_cred_info.rst","datahub_cluster.rst","datahub_cluster_info.rst","datahub_definition_info.rst","datahub_template_info.rst","datalake.rst","datalake_info.rst","datalake_runtime_info.rst","df.rst","df_info.rst","dw_cluster.rst","dw_cluster_info.rst","env.rst","env_auth.rst","env_auth_info.rst","env_cred.rst","env_cred_info.rst","env_idbroker.rst","env_idbroker_info.rst","env_info.rst","env_proxy.rst","env_proxy_info.rst","env_telemetry.rst","env_user_sync.rst","env_user_sync_info.rst","freeipa_info.rst","iam_group.rst","iam_group_info.rst","iam_resource_role_info.rst","iam_user_info.rst","index.rst","ml.rst","ml_info.rst","ml_workspace_access.rst","opdb.rst","opdb_info.rst"],objects:{},objnames:{},objtypes:{},terms:{"00b58f27be":27,"00b58f27be4e7ab9f":[7,8],"00f2":[14,21],"01234":[14,21],"012345":[14,21],"04a332603a269535f":[14,21],"07bbea553ca667b66":[14,21],"08785c81e888251df":[14,21],"0aad7d6d9aa66d1e7":[14,21],"0e9bc67a":[25,26],"100":[3,7],"1111104421142":7,"1234":19,"1602080301000":[25,26],"168":10,"192":10,"19t15":[33,34],"1a0f05edc010":[22,23],"2020":[7,8,15,28,29,31],"2021":[33,34],"226a":[14,17,18,21],"240":[7,8],"2xlarg":33,"311d51259233":[14,17,18,21,22,23],"32b18f82":2,"3600":10,"381358652250":[14,21],"3875500000000":2,"38eeb2b9":[14,21],"38fe":[22,23],"414f":2,"41b5":31,"4275":[25,26],"4357":[14,17,18,21,22,23],"4844562":[7,8],"4958":[14,21],"4be7":[14,17,18,21],"4c2d":31,"4c3c":[22,23],"4d10":[14,21],"531000":[28,29,31],"558bc1d2":[14,17,18,21,22,23],"56789":[14,21],"61eb5b97":[14,17,18,21],"654468598544":19,"6e57":[14,21],"6f7cc06b4937":[14,21],"784255c25b7d":31,"795d18a043b5":[14,17,18,21],"808000":31,"8194":[22,23],"8443":[14,21,22,23],"847000":[7,8],"8524":[14,17,18,21,22,23],"8867":[14,17,18,21,22,23],"8xlarg":33,"90c1":[14,21],"92e9":31,"935c":[25,26],"981304421142":[14,17,32],"997000":[33,34],"boolean":[33,34],"case":[3,7,15,28],"default":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],"export":[33,34],"function":32,"int":[0,1,3,4,7,10,11,12,14,17,22,23,25,33,34,36],"new":[14,19],"public":[10,12,14,21,33],"true":[10,21],"var":32,"while":[3,7,10,12,14,25,33,36],AWS:[2,3,7,8,12,14,17,18,19,20,21,32,33,35],For:[17,19,32,35],GCS:7,IDs:[12,14,16],NFS:33,Not:[19,20],One:14,TLS:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],The:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],These:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],__datalak:[19,20],__my_teardown_request:10,__subnetid__:[14,21],_admin:31,_environ:16,_workload:16,a_labeled_public_kei:[14,21],aaaab3nzac:[14,21],abcd:[14,19,21],abf:[14,21],abl:0,about:[0,3,7,10,12,14,28,33,35,36],absent:[3,7,10,12,14,17,22,28,33,35,36],access:[7,8,14,17,19,20,21,32,33,34],access_output:35,accessor:19,accessorcrn:[19,20],account:[7,14,17,18,19,21,31,32],account_id:2,accountadmin:31,achiev:[3,7,10,12,14,25,33,36],activ:[10,11],activeerroralertcount:[10,11],activewarningalertcount:[10,11],actor:[12,13,19,20],ad91:[14,21],added:6,addit:[14,21],address:[12,13,14,21,31],adl:7,admin:[0,7],administr:[0,28,31],aedc:2,affect:[0,15],after:0,alert:[10,11],alias:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],all:[0,4,5,6,8,9,11,13,14,15,16,18,19,20,21,23,25,26,28,29,30,31,32,33,34,37],allow:[14,21,33],along:14,alphabet:28,alphanumer:[14,28],alreadi:14,also:[19,20,32],altu:[19,30],alwai:[0,1,2,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37],analyt:24,ani:[3,7,19,20,27,29],anoth:[14,19,25],ansibl:15,api:[7,8,10,32],appli:[33,34],applic:[10,11,17,33,34],applicationid:17,arbitrari:[3,7,14],arn:[7,14,17,18,19,20,21,32,35],arrai:[3,4,18,33,34],asset:32,assign:[14,28,29,30],associ:[3,7,8,14,19,20,21,28,29],assum:[7,32],async:10,atla:[7,8,33,34],atlas_api:[7,8],atlas_serv:[7,8],attach:[3,7],attachedvolumeconfigur:3,audit:[14,19,20,21],authent:[2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],authorized_ip_rang:10,authorizediprang:[10,11],autom:32,autosc:33,avail:[9,14,21,24,33,34],availabilityzon:[14,21,33,34],aws:[2,7,14,17,19,21,32],aws_private_subnet:12,aws_public_subnet:12,awsconfigur:[7,8],awsdetail:[14,21],az_enable_az:12,az_subnet:12,azur:[2,3,7,8,12,14,17,19,20,21,32,33],azureconfigur:[7,8],azuredetail:[14,21],b308:[25,26],b3ee137560e3:2,b56d:[14,17,18,21],b8c764dc13be:[25,26],back:[21,33],backward:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],balanc:[10,33],barbazgaz:22,base64:[2,16],base:[7,14,21],basedomain:[33,34],basic:[4,5,6,8,9,11,13,21,23,31,34,37],been:0,befor:32,begin:14,being:[17,33,34],belong:31,below:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33,34,35,36,37],best:32,between:[3,7,14,17],blob:[14,21],block:33,bool:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],both:24,bring:[19,20],broker:[7,8],bucket:[7,14,21,32],can:[3,7,14,28,31,32,33,34],captur:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],catalog:3,catalognam:[3,4],catalogurl:[3,4],cbab8ee3:[14,21],cdh7:[7,8],cdp:[27,32],cdp_profil:25,cdpy:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33,34,35,36,37],cert:16,certif:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],chaffelson:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,36,37],chang:[0,3,7,14],charact:[3,7,14,15,28],check:[33,34],check_mod:[0,1,2,15,16,17,18,19,20,25,26],choic:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],chri:[3,5],christian:21,cidr:[14,21,33],classifi:[10,11],clear:19,clear_map:19,cleroi:21,cli:32,clone:32,cloud:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],cloudbreak:[14,21],cloudera:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],clouderamanag:[3,4,7,8],clouderamanagerrepositoryurl:[7,8],clouderamanagerserverurl:[7,8],clouderassologinen:[0,1],cloudplatform:[3,4,5,7,8,10,11,12,13,14,17,18,21,33,34],cluster:[3,4,7,10,11,14,19,20,21,31,33,34,36,37],clusterbasedomain:[33,34],clusterdefinitionnam:5,clusterid:[10,11],clusternam:[3,4],clusterstatu:[3,4],clustertemplatecont:6,clustertemplatecrn:[3,4],clustertemplatenam:6,cmperro:[3,5],code:[14,21],collect:[24,28],collection_path:32,com:[14,21,22,23,32],combin:15,comment:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],common:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],commun:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],compar:31,compat:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],complet:[7,14,19,20,25,26,33],complex:[14,17,18,21,25,26],config:[14,21,22,23],configur:[7,8,14,21,22,23,32,33],conflict:15,conform:17,connect:[10,32],consist:17,consol:32,constrain:[4,8],contain:[3,7,14,21,28,33,34],content:[3,5,6,7,14,32],contributor:[14,21],control:[14,21],core:[14,21],count:[5,6,10,11],cpu_set:33,creat:[2,3,7,8,10,13,14,19,21,27,29,31,34],create_fail:[14,21],creation:[3,12,13,17,18,33,34,36,37],creation_initi:[14,21],creationd:[3,4,7,8,12,13,28,29,31,33,34,36,37],creator:[12,13,33,34,36,37],creatorcrn:[33,34,36,37],credenti:[7,8,14,21,22,23,32],credentialcrn:[3,4,7,8],credentialnam:[14,17,18,21],crn:[3,4,5,6,7,8,10,11,12,13,14,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,36,37],crn__:[19,20],cross:[2,17,18],csa1:[7,8],current:[10,11,16,25,31,33,34],current_us:[25,31],custom:[31,33],dai:[0,1],dan:[0,1,2,4,5,6,7,8,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,28,29,30,31,33,34,36,37],daniel:[3,17,26],data:[7,14,19,20,21,32],data_access:19,data_access_arn:19,dataaccessrol:[19,20],databas:[10,21,33],database_config:33,databasenam:[36,37],dataengin:5,datahub:21,datahub_tag:3,datalak:[3,14,19,20,21,25,32],datalake_info:7,datalake_tag:7,datalakecrn:[3,4],datalakenam:[7,8],datamart:5,datawarehous:21,date:[19,20,28,29,31,33,34],dbversion:[36,37],debug:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],debug_cdpsdk:1,debug_endpoint:[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],declar:[3,7,10,12,14,16,25,32,33,35,36],default_security_group:14,default_set:33,default_sg:14,defaultruntimevers:9,defaultsecuritygroupid:[14,21],defin:[0,22,25,31],definit:[2,3],definition_cont:5,delai:[3,7,10,12,14,17,25,33,36],delet:[3,7,14,17,19,22,28,33],demand:[10,11],depend:10,deploi:[10,12,14,33,34],deploy:[10,11,14,21,24,33],deploymentcount:[10,11],deriv:[17,18],desc:[14,17],descend:21,describ:[4,5,6,8,11,13,18,21,23,25,26,27,34,37],descript:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],design:[0,2,9],desir:33,detail:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],dflocalurl:[10,11],dfs:[14,21],diagnost:14,dict:[0,1,2,3,4,6,7,8,10,11,12,13,14,16,19,20,21,22,27,28,31,33,35,36],dictat:[5,6],dictionari:[2,16,18],digit:15,disabl:[0,28],disable_sso:0,discovery_data_and_explor:5,displaynam:[3,4,7,8],document:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],doe:[19,20],domain:[7,8,14,21],don:[7,14,19],drop:36,dure:[10,17,18,33,34],dwadmin:30,dwuser:30,dynamodb:21,each:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],easiest:32,east:[14,21,32],eb6c5fc8:[22,23],efghi:19,either:[14,21,28],email:[7,12,13,31],empti:[18,19,33,34],enabl:[0,1,3,7,11,12,14,19,21,33,34,36],enable_cloudera_sso:0,enable_govern:33,enable_metr:33,enable_monitor:33,enable_public_loadbalanc:33,enable_sso:0,enable_tl:33,enable_tunnel:14,encod:16,encount:27,end:[25,26],enddat:[19,20],endpoint:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],endpoint_access_schem:14,endpoint_access_subnet:14,endpointpublicaccess:[33,34],endtim:[25,26],enright:27,ensur:32,entiti:10,entri:[3,7,8],env:[3,4,7,8,12,13,32,33,34,35,36,37],env_crn:[10,12],env_info:[14,22,32],env_stop:[14,21],environ:[3,4,7,8,10,11,12,13,15,17,18,20,26,27,32,33,34,35,36,37],environment_tag:14,environmentcrn:[3,4,7,8,12,13,25,26,27,33,34,36,37],environmentnam:[14,21,27,33,34,36,37],epoch:[25,26],error:[1,10,11,15,17,19,20,25,26,33],errordetail:[19,20],especi:21,establish:17,even:33,event:[25,26],eventu:17,exampl:32,example_loc:[14,21],exclus:[14,19,25,31],execut:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33,34,35,36,37],exist:[19,32,33],existing_databas:33,existing_nf:33,experi:[21,32],expir:[0,1],explan:[7,8],expos:[7,8],extern:[14,21],external_database_creation_in_progress:[7,8],external_database_deletion_in_progress:[7,8],external_database_start_in_progress:[7,8],external_database_stop_in_progress:[7,8],external_id:2,f2e7cd8a:31,f6d9bceecb54:[14,21],f868:2,fail:[3,7,17,19,20,25,26],failur:[25,26,33,34],failuremessag:[33,34],fals:[3,7,10,12,14,33,36],featur:[10,11],field:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],file:[17,32,35],filesystem:[33,34],filesystemid:[33,34],filter:31,find:[4,8,13,34,36,37],first:[28,31],firstnam:31,flag:[0,1,3,5,6,7,8,9,10,12,14,15,16,19,20,21,24,28,29,31,33,34,36],flink:[7,8],flow_manag:5,follow:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],foo:22,forc:[3,7,22,33],force_delet:33,format:[17,32],found:[18,21,29],fqcn:32,fqdn:[3,4],freeipa:[14,16,21],freeipa_creation_in_progress:[14,21],freeipa_delete_in_progress:[14,21],freeipa_deleted_on_provider_sid:[14,21],fresh:19,friendli:[7,8],from:[1,2,3,7,16,17,18,33,34],full:28,fulli:[19,32],galaxi:32,gatewai:[3,14],gather_fact:32,gcp:[3,7,14,17,19,21],gcpconfigur:7,gener:[3,4,25,26,33,34],git:32,given:[8,14,16,21],globalstatu:[19,20],googl:[17,21],govern:[16,33,34],governanceen:[33,34],gpu_set:33,grant:[28,29],group:[3,6,7,8,14,19,20,21,30,32,33,34],group_nam:[28,29],groupnam:[28,29],guarante:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],has:[0,19,33,34],have:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],hbase:[36,37],health:[33,34],healthi:[7,8],healthinfo:[33,34],healthinfolist:[33,34],heartbeat:[33,34],help:32,here:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],high:[10,11],host:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,32,33,34,35,36,37],hostnam:[14,21,27,33],http:[7,8,14,21,22,23,32,33,34],httpsenabl:[33,34],hub:14,hue:[36,37],hueendpoint:[36,37],hyphen:[3,7,14,17],iam:[7,14,17,19,21,32],iam_info:31,idbrok:[7,8,19,20],ident:[7,8,14,21,31],identifi:[2,7,8,14,19,21,27,28,31,35],identiti:[19,20],identityprovidercrn:31,ignor:[15,19],imag:[3,4],imagedetail:[3,4],immedi:[3,7,10,12,14,17,33,36],impact:28,inbound:[14,21],inbound_cidr:[14,32],includ:[6,19,20,32],indic:[0,1,3,7,10,16,19,20,28,29,33,34],individu:[19,20],info:[33,34],inform:[0,3,7,10,12,14,28,33,35,36],initi:[33,34],instal:[2,19,33,34],instanc:[3,6,7,8,10,11,14,21,27,32,33,34],instance_profil:[7,14],instancecount:[33,34],instancegroup:[3,4,7,8,33,34],instancegroupcount:6,instancegroupnam:[3,33,34],instancegrouptyp:3,instanceid:[33,34],instancenam:[33,34],instanceprofil:[7,8,14,21],instancestatu:[33,34],instanceti:33,instancetyp:[3,10,11,33,34],instanceurl:[33,34],integr:33,interact:[0,1,31,32],interfac:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],intern:[3,7,10,12,14,25,33,36,37],internalnam:[36,37],internet:14,interv:[3,7,10,12,14,25,33,36],ip_address:33,ip_rang:10,ipaserv:[14,21],ipaserver0:27,ips:[33,34],ipv4:[14,21],ipv6:[14,21],ishealthi:[33,34],issu:27,its:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],jenright:27,jim:27,job:14,json:[5,6],k8s:[33,35],k8s_request:33,k8sclusternam:[33,34,37],k8snodecount:[10,11],kei:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],keytab:16,knox:[7,8,14,21],knox_security_group:14,knox_sg:14,knoxservic:[3,4,7,8],kubeconfig:35,kubernet:[10,11,33,34,37],lab:32,larg:21,last:31,lastinteractivelogin:31,lastnam:31,learn:[21,34],length:14,leroi:21,letter:[3,7,17],level:1,lifetim:[0,1],light_duti:7,line:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],linger:[3,7],list:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],load:[10,33],loadbalanc:[33,34],loadbalancer_access_ip:33,loadbalanceripwhitelist:[33,34],local:[10,11,32],localhost:32,locat:[7,14,21,36,37],log:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],log_ident:[14,32],log_loc:[14,32],log_rol:[14,21],logger:[14,21],loggerident:[14,21],login:[0,1,31],loginusernam:[14,21],logs_collect:24,logstorag:[14,21],lower:15,lowercas:[3,7,14,17],lowest:10,machin:[12,13,21,28,34],machineusernam:[12,13],mai:[10,11,21],main:32,maintain:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],manag:[8,21,32,33],managedident:[7,8,14,21],manual:[3,7],map:[19,20],mappingsvers:[19,20],master:3,match:31,max:[0,1],max_k8s_node_count:10,maximum:[0,10,11,28,33,34],maxinst:[33,34],maxk8snodecount:[10,11],maxpasswordlifetimedai:[0,1],medium_duty_ha:7,member:[28,29],membership:[28,29],messag:[10,11,25,26,33,34],metadata:[14,21],metric:[33,34],microsoft:[14,21],might:[33,34],min_k8s_node_count:10,minimum:[10,11,15,33,34],mininst:[33,34],mink8snodecount:[10,11],minut:14,ml_workspace_acc:35,mode:[3,4,7,8,12],model:[33,34],modelmetricsen:[33,34],modul:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],monitor:[33,34],monitoringen:[33,34],more:[12,14,15,21,25,26],most:[19,20,33,34],mount:33,mudg:[0,1,2,3,4,5,6,7,8,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37],multipl:[14,16,25],must:[3,7,11,13,14,15,17,19,28,32,34,36,37],mutual:[14,19,25,31],name:[3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],name_:16,namespac:32,necessari:[14,21,32],need:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,32,33,34,35,36,37],net:[14,21],network:[14,21],network_cidr:[14,32],networkcidr:[14,21],networkid:[14,21],networknam:21,networksecuritygroup:[14,21],never:[0,1],never_run:[19,20,25,26],nfs:33,nfs_version:33,no_log:15,node:[5,10,11,14,21,33,34],nodecount:[3,4,5],nodes_max:10,nodes_min:10,non:[0,14,21],notabl:16,note:[0,1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],now:19,nsg:[14,21],number:[3,7,9,10,11,17,33,34],object:[17,18,21,25,26,33,34],occur:[33,34],odus:30,off:[24,33],omit:[19,20],on_demand:33,onc:19,one:[14,15,16,25,26,32],onli:[0,3,7,9,14,16,17,21,28,33],onlin:32,opdb:21,open:[3,4,7,8],oper:[17,19,20,21,25,26,33],operationaldatabas:5,operationid:[25,26],operations_id:26,operationtyp:[25,26],option:[3,4,7,8],other:[0,14,21,32],otherwis:9,output:[17,32,35],over:14,overal:[19,20],pair:[31,33,34],pam:[7,8],parent:[10,11],particular:14,password:[0,1,14,15,21,22],password_lifetim:0,path:[7,17,33],period:17,permiss:[14,21],perro:[3,5],persist:10,pip:32,place:[14,36],platform:[10,11,12,13,14,32,33,34],platformvers:[3,4],pleas:32,polici:[0,1,2],poll:[3,7,10,12,14,25,33,36],polling_delai:[3,7,10,12,14,25,33,36],polling_timeout:[3,7,10,12,14,25,33,36],port:[14,21,22,23],possibl:17,postgr:33,practic:32,present:[3,7,10,12,14,17,19,20,22,25,28,32,33,35,36],preview:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],privat:[12,14,21,33],privateip:[3,4],product:[5,6,7,8],productvers:[5,6,7,8],profil:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],project:[3,7,14,21,32],protocol:[14,21,22,23,33],provid:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],provis:[10,11,32,33,34],provision_k8:33,provisioning_fail:[7,8],proxi:[14,21],proxy_config:14,proxy_config_nam:14,proxy_usernam:[22,23],proxyconfig:[14,21],proxyconfignam:[14,21,22,23],public_kei:14,public_key_id:[14,32],public_key_text:14,public_loadbalanc:[10,33],publicip:[3,4],publickei:[14,21],publickeyid:[14,21],publicli:[33,34],purg:28,qualifi:[19,32],queri:[14,16],rang:[10,11,14,21],ranger:[19,20],ranger_audit:19,ranger_audit_arn:19,ranger_cloud_access:19,ranger_cloud_access_arn:19,rangerauditrol:[19,20],rangercloudaccessauthorizerrol:[19,20],raz:[19,20],reach:7,recent:[19,20,33,34],recipenam:3,record:[10,28,29,31],recoverymod:3,refer:32,referenc:[33,34],regex:31,region:[7,8,10,11,14,21,32],regist:[10,14,21,32,35],reject:[19,20,25,26],relat:[7,8,10],relev:14,remov:[3,7,10,33,36],remove_storag:33,replac:28,report_deployment_log:24,repositori:[7,8,32],request:[7,8,12,19,20,21,25,26,33],reserv:28,resolv:21,resourc:[3,7,14,19,20,21,28,29,32,33,34],resource_rol:[28,29,30],resourcecrn:[28,29],resourcegroup:[14,21],resourcegroupnam:[14,21],resourcenam:[33,34],resourcerol:30,resourcerolecrn:[28,29],restrict:14,result:32,retain:10,retri:17,retriev:[13,16,34,37],return_cont:6,right:[28,29,30],role:[7,14,17,18,19,20,21,28,29,32],role_arn:17,root:16,root_ca:16,root_certif:16,rootvolum:33,rootvolumes:3,rsa:[14,21],run:[7,8,19,20,25,26],runtim:7,runtimevers:9,s3a:[7,14,21,32],s3guard:21,s3guardtablenam:21,saml:0,sampl:[2,5,6,7,8,9,14,17,18,19,20,21,22,23,25,26,27,28,29,31,33,34],scale:[7,10,11],scheme:14,sdk:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],sdk_out:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],sdk_out_lin:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],second:[3,7,10,12,14,17,25,26,33,36],secret:17,secret_password:[14,21],secur:[14,21],security_cidr:14,securityaccess:[14,21],securitygroupidforknox:[14,21],see:[7,14,32],select:[15,16],sensit:[3,7,28],sent:14,server:[7,8,10,27,33],serverip:[14,21],servic:[3,7,8,14,17,19,20,21],serviceaccountemail:7,servicenam:[3,4,7,8],serviceurl:[3,4,7,8],set:[2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37],set_empty_map:19,setup:33,sever:[14,29,30],sharedprojectid:21,should:[3,7,14,15,19,21],show:[33,34],sign:[7,8],simpl:32,singl:[7,8,16,25,28,29,30,31],site:[14,21,27],situat:[10,11],size:33,slow:21,some:[7,8,14,17,19,20,21,35],special:15,specif:[2,7,8,14,21,35],specifi:[3,5,6,14,15,16,24,27,28],ssh:[14,21],ssh_kei:14,ssh_key_id:14,ssh_key_text:14,ssh_tunnel:14,sshkei:[14,32],sso:[0,1,7,8],stabl:31,stack:10,stack_creation_in_progress:[7,8],stack_deletion_in_progress:[7,8],start:[3,7,14,19,20,25,26],start_freeipa_fail:[14,21],start_in_progress:[7,8],startdat:[19,20],starttim:[25,26],state:[3,4,7,8,10,11,12,14,17,22,25,27,28,32,33,35,36],statement:31,statment:31,status:[19,20],statusreason:[3,4,7,8,14,21],stop:[7,8,14],stop_freeipa_start:[14,21],stop_in_progress:[7,8],storag:[7,14,21,33,36,37],storage_loc:7,storage_location_bas:[7,14],storageloc:[36,37],storagelocationbas:[14,21],store:[14,21,33],str:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],stream:5,strict:15,string:[2,11,14,16,21,35],subnet:[3,12,14,21],subnet_id:14,subnetid:[14,21],subnetmetadata:[14,21],subnetnam:[14,21],subscript:[14,17,21],succeed:[25,26],success:[3,4,5,6,7,8,9,14,17,19,20,21,22,23,25,26,27,28,29,30,31,35],summari:[19,20],support:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],sync:[19,20,28,29],sync_map:19,sync_membership:28,sync_on_login:28,synchron:[25,26],syncmembershiponuserlogin:[28,29],syncneed:[19,20],syncstatu:[19,20],tabl:21,table_nam:21,tag:[3,6,7,14,32,33,34],take:14,target:[12,14,15,16,17,24],task:32,technic:[10,11],templat:[3,5],template_cont:6,tenant:17,termin:[19,20],text:17,than:15,the_usernam:[14,21],thi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],time:[12,13,17,33,34,36,37],timedout:[19,20,25,26],timeout:[3,7,10,12,14,25,33,36],timestamp:[7,8,25,26,33,34],tktk:[3,4],tls:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],traffic:[14,21],tunnel:14,turn:[24,33],two:[15,16],txt:32,type:[3,5,10,11,25,26,32,33,34],u_023:31,under:[10,11],underli:1,underscor:28,uniqu:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],unix:[33,34],updat:[0,14,15],updatedat:[33,34],upper:15,uri:[7,12,17],url:[7,8,10,11,14,33,34],usag:[33,34],use:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],use_public_load_balanc:10,used:[3,7,8,12,13,16,17,18,31,32,33,34],usepublicip:[14,21],user:[0,7,8,12,13,14,16,19,20,21,22,23,28,29,32,33,34],user_keytab:16,user_manag:6,user_nam:31,user_sync:[25,26],usera:16,userassignedident:[14,21],userb:16,userid:31,usernam:[12,13,16,31],username_:16,uses:[33,34],using:[0,1,2,11,13,18,32,34,37],utc:[12,13,36,37],uuid:[3,25,26],variou:32,veri:21,verifi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],verify_tl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],version:[3,4,5,6,7,8,9,19,20,32,33,34,36,37],via:32,vnet:[14,21],volum:3,volumecount:3,volumes:3,volumetyp:3,vpc:[14,21],vpc_id:14,vpcid:[14,21],wai:32,wait:[3,7,10,12,14,25,33,36],warn:[10,11],webster:[0,1,2,3,4,5,6,7,8,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37],well:[3,7,32],west:[14,17,18,19,21,22,23,30],when:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],where:[14,31],whether:[0,1,10,12,16,19,20,28,29,31],which:[3,4,7,8,13,14,17,19,20,21,28,29,32,34,36,37],whitelist:[33,34],who:0,window:[14,21],within:[14,15,21],wmudg:[0,1,2,3,4,5,6,7,8,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37],work:32,workdloadtyp:[3,4],workload:[0,1,5,14,15,16,24,31],workload_analyt:[14,24],workload_password:15,workload_password_lifetim:0,workloadpasswordpolici:[0,1],workloadtempl:5,workloadusernam:[12,13,31],workspac:21,workspace_crn:34,wrapper:32,write:[19,20],yes:[0,6,9,10,12,16,17,19,25,28,31,33],yml:32,you:32,zero:[12,21],zone:[14,21,33,34]},titles:["account_auth -- Gather and set authentication details for a CDP Account","account_auth_info -- Gather information about CDP Account authentication settings","account_cred_info -- Gather information about Account prerequisites for CDP Credentials","datahub_cluster -- Manage CDP Datahubs","datahub_cluster_info -- Gather information about CDP Datahubs","datahub_definition_info -- Gather information about CDP Datahub Cluster Definitions","datahub_template_info -- Gather information about CDP Datahub Cluster Templates","datalake -- Manage CDP Datalakes","datalake_info -- Gather information about CDP Datalakes","datalake_runtime_info -- Gather information about CDP Datalake Runtimes","df -- Enable or Disable CDP DataFlow Services","df_info -- Gather information about CDP DataFlow Services","dw_cluster -- Create or Delete CDP Data Warehouse Clusters","dw_cluster_info -- Gather information about CDP Data Warehouse Clusters","env -- Manage CDP Environments","env_auth -- Set authentication details for the current CDP user","env_auth_info -- Gather information about CDP environment authentication details","env_cred -- Create, update, and destroy CDP credentials","env_cred_info -- Gather information about CDP Credentials","env_idbroker -- Update ID Broker for CDP Environments","env_idbroker_info -- Gather information about CDP ID Broker","env_info -- Gather information about CDP Environments","env_proxy -- Create, update, or destroy CDP Environment Proxies","env_proxy_info -- Gather information about CDP Environment Proxies","env_telemetry -- Set CDP environment telemetry","env_user_sync -- Sync CDP Users and Groups to Environments","env_user_sync_info -- Get the status of a CDP Users and Groups sync","freeipa_info -- Gather information about FreeIPA","iam_group -- Create, update, or destroy CDP IAM Groups","iam_group_info -- Gather information about CDP Public IAM groups","iam_resource_role_info -- Gather information about CDP Public IAM resource roles","iam_user_info -- Gather information about CDP Public IAM users","cloudera.cloud Ansible Collection","ml -- Create or Destroy CDP Machine Learning Workspaces","ml_info -- Gather information about CDP ML Workspaces","ml_workspace_access -- Grant and revoke user access to CDP Machine Learning Workspaces","opdb -- Create or destroy CDP OpDB Databases","opdb_info -- Gather information about CDP OpDB Databases"],titleterms:{"public":[29,30,31],"return":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],Using:32,about:[1,2,4,5,6,8,9,11,13,16,18,20,21,23,27,29,30,31,34,37],access:35,account:[0,1,2],account_auth:0,account_auth_info:1,account_cred_info:2,ansibl:32,authent:[0,1,15,16],author:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],broker:[19,20],cdp:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,33,34,35,36,37],cdpy:32,cloud:32,cloudera:32,cluster:[5,6,12,13],collect:32,creat:[12,17,22,28,33,36],credenti:[2,17,18],current:15,data:[12,13],databas:[36,37],dataflow:[10,11],datahub:[3,4,5,6],datahub_clust:3,datahub_cluster_info:4,datahub_definition_info:5,datahub_template_info:6,datalak:[7,8,9],datalake_info:8,datalake_runtime_info:9,definit:5,delet:12,destroi:[17,22,28,33,36],detail:[0,15,16],develop:32,df_info:11,disabl:10,dw_cluster:12,dw_cluster_info:13,enabl:10,env:14,env_auth:15,env_auth_info:16,env_cr:17,env_cred_info:18,env_idbrok:19,env_idbroker_info:20,env_info:21,env_proxi:22,env_proxy_info:23,env_telemetri:24,env_user_sync:25,env_user_sync_info:26,environ:[14,16,19,21,22,23,24,25],exampl:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],freeipa:27,freeipa_info:27,from:32,gather:[0,1,2,4,5,6,8,9,11,13,16,18,20,21,23,27,29,30,31,34,37],get:26,github:32,grant:35,group:[25,26,28,29],iam:[28,29,30,31],iam_group:28,iam_group_info:29,iam_resource_role_info:30,iam_user_info:31,inform:[1,2,4,5,6,8,9,11,13,16,18,20,21,23,27,29,30,31,32,34,37],instal:32,learn:[33,35],librari:32,machin:[33,35],manag:[3,7,14],ml_info:34,ml_workspace_access:35,more:32,note:[10,11],opdb:[36,37],opdb_info:37,paramet:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],playbook:32,prerequisit:2,proxi:[22,23],python:32,requir:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,32,33,34,35,36,37],resourc:30,revok:35,role:30,run:32,runtim:9,servic:[10,11],set:[0,1,15,24],statu:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],sync:[25,26],synopsi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],telemetri:24,templat:6,test:32,updat:[17,19,22,28],usag:32,user:[15,25,26,31,35],valu:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37],warehous:[12,13],workspac:[33,34,35],your:32}}) \ No newline at end of file diff --git a/docsrc/df_info.rst b/docsrc/df_info.rst index df8af987..185a8c2e 100644 --- a/docsrc/df_info.rst +++ b/docsrc/df_info.rst @@ -44,7 +44,7 @@ Parameters | **Parameter** | **Choices/Defaults** | **Comments** | +----------------+----------------------+-----------------------------------------------------------------+ | **name** | | If a name is provided, that DataFlow Service will be described. | - | | | | + | | | Must be CDP Environment CRN or string name of DataFlow Service | | |br| | | | | | | | | ``str`` | | | diff --git a/docsrc/env.rst b/docsrc/env.rst index e7346137..1a84c86a 100644 --- a/docsrc/env.rst +++ b/docsrc/env.rst @@ -42,264 +42,264 @@ Parameters .. table:: :widths: 30 20 50 - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **Parameter** | **Choices/Defaults** | **Comments** | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **name** | | The name of the target environment. | - | | | Names must begin with a lowercase alphanumeric, contain only lowercase alphanumerics and hyphens, and be between 5 to 28 characters in length. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | |br| | | | - | | | | - | *Required* | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: environment* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **state** | **Choices:** | The declarative state of the environment | - | | - **present** |larr| | If *state=present*, one of *cloud* or *credential* must be present. | - | |br| | - started | | - | | - stopped | | - | ``str`` | - absent | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **cloud** | **Choices:** | The cloud provider or platform for the environment. | - | | - aws | Requires *region*, *credential*, *log_location*, and *log_identity*. | - | |br| | - azure | If *cloud=aws*, one of *public_key* or *public_key_id* must be present. | - | | - gcp | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | - | ``str`` | | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | - | | | If *cloud=aws*, one of *inbound_cidr* or *default_sg* and *knox_sg* must be present. | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **region** | | The cloud platform specified region | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **credential** | | The CDP credential associated with the environment | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **project** | | Name of Project when deploying environment on GCP | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **inbound_cidr** | | CIDR range which is allowed for inbound traffic. Either IPv4 or IPv6 is allowed. | - | | | Mutually exclusive with *default_sg* and *knox_sg*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: security_cidr* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **default_sg** | | Security group where all other hosts are placed. | - | | | Mutually exclusive with *inbound_cidr*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: default, default_security_group* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **knox_sg** | | Security group where Knox-enabled hosts are placed. | - | | | Mutually exclusive with *inbound_cidr*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: knox, knox_security_group* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **public_key_text** | | The content of a public SSH key. | - | | | Mutually exclusive with *public_key_id*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: ssh_key_text* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **public_key_id** | | The public SSH key ID already registered in the cloud provider. | - | | | Mutually exclusive with *public_key_text*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: public_key, ssh_key, ssh_key_id* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **log_location** | | (AWS) The base location to store logs in S3. This should be an s3a:// url. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: storage_location_base* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **log_identity** | | (AWS) The instance profile ARN assigned the necessary permissions to access the S3 storage location, i.e. *log_location*. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: instance_profile* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **network_cidr** | | (AWS) The network CIDR. This will create a VPC along with subnets in multiple Availability Zones. | - | | | Mutually exclusive with *vpc_id* and *subnet_ids*. | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **vpc_id** | | (AWS) The VPC ID. | - | | | Mutually exclusive with *network_cidr* and requires *subnet_ids*. | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: vpc* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **subnet_ids** | | (AWS) One or more subnet identifiers within the VPC. | - | | | Mutually exclusive with *network_cidr* and requires *vpc_id*. | - | |br| | | | - | | | | - | ``list`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: subnets* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **tags** | | Tags associated with the environment and its resources. | - | | | | - | |br| | | | - | | | | - | ``dict`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: environment_tags* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **workload_analytics** | | Flag to enable diagnostic information about job and query execution to be sent to Workload Manager for Data Hub clusters created within the environment. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **description** | | A description for the environment. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: desc* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **tunnel** | | Flag to enable SSH tunnelling for the environment. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: enable_tunnel, ssh_tunnel* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **freeipa** | | The FreeIPA service for the environment. | - | | | | - | |br| | | | - | | | | - | ``dict`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **proxy** | | The name of the proxy config to use for the environment. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: proxy_config, proxy_config_name* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **wait** | | Flag to enable internal polling to wait for the environment to achieve the declared state. | - | | | If set to FALSE, the module will return immediately. | - | |br| | | | - | | | | - | ``bool`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **delay** | | The internal polling interval (in seconds) while the module waits for the environment to achieve the declared state. | - | | | | - | |br| | | | - | | | | - | ``int`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: polling_delay* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **timeout** | | The internal polling timeout (in seconds) while the module waits for the environment to achieve the declared state. | - | | | | - | |br| | | | - | | | | - | ``int`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: polling_timeout* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **s3_guard_name** | | (AWS) AWS Dynamo table name for S3 Guard. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: s3_guard, s3_guard_table_name* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **verify_tls** | | Verify the TLS certificates for the CDP endpoint. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: tls* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **debug** | | Capture the CDP SDK debug log. | - | | | | - | |br| | | | - | | | | - | ``bool`` | | | - | | | | - | | | |br| | - | | | | - | | | *Aliases: debug_endpoints* | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **profile** | | If provided, the CDP SDK will use this value as its profile. | - | | | | - | |br| | | | - | | | | - | ``str`` | | | - +------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Choices/Defaults** | **Comments** | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **name** | | The name of the target environment. | + | | | Names must begin with a lowercase alphanumeric, contain only lowercase alphanumerics and hyphens, and be between 5 to 28 characters in length. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | |br| | | | + | | | | + | *Required* | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: environment* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **state** | **Choices:** | The declarative state of the environment | + | | - **present** |larr| | If *state=present*, one of *cloud* or *credential* must be present. | + | |br| | - started | | + | | - stopped | | + | ``str`` | - absent | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **cloud** | **Choices:** | The cloud provider or platform for the environment. | + | | - aws | Requires *region*, *credential*, *log_location*, and *log_identity*. | + | |br| | - azure | If *cloud=aws*, one of *public_key* or *public_key_id* must be present. | + | | - gcp | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | + | ``str`` | | If *cloud=aws*, one of *network_cidr* or *vpc_id* must be present. | + | | | If *cloud=aws*, one of *inbound_cidr* or *default_sg* and *knox_sg* must be present. | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **region** | | The cloud platform specified region | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **credential** | | The CDP credential associated with the environment | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **project** | | Name of Project when deploying environment on GCP | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **inbound_cidr** | | CIDR range which is allowed for inbound traffic. Either IPv4 or IPv6 is allowed. | + | | | Mutually exclusive with *default_sg* and *knox_sg*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: security_cidr* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **default_sg** | | Security group where all other hosts are placed. | + | | | Mutually exclusive with *inbound_cidr*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: default, default_security_group* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **knox_sg** | | Security group where Knox-enabled hosts are placed. | + | | | Mutually exclusive with *inbound_cidr*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: knox, knox_security_group* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **public_key_text** | | The content of a public SSH key. | + | | | Mutually exclusive with *public_key_id*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: ssh_key_text* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **public_key_id** | | The public SSH key ID already registered in the cloud provider. | + | | | Mutually exclusive with *public_key_text*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: public_key, ssh_key, ssh_key_id* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **log_location** | | (AWS) The base location to store logs in S3. This should be an s3a:// url. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: storage_location_base* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **log_identity** | | (AWS) The instance profile ARN assigned the necessary permissions to access the S3 storage location, i.e. *log_location*. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: instance_profile* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **network_cidr** | | (AWS) The network CIDR. This will create a VPC along with subnets in multiple Availability Zones. | + | | | Mutually exclusive with *vpc_id* and *subnet_ids*. | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **vpc_id** | | (AWS) The VPC ID. | + | | | Mutually exclusive with *network_cidr* and requires *subnet_ids*. | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: vpc* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **subnet_ids** | | (AWS) One or more subnet identifiers within the VPC. | + | | | Mutually exclusive with *network_cidr* and requires *vpc_id*. | + | |br| | | | + | | | | + | ``list`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: subnets* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **tags** | | Tags associated with the environment and its resources. | + | | | | + | |br| | | | + | | | | + | ``dict`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: environment_tags* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **workload_analytics** | | Flag to enable diagnostic information about job and query execution to be sent to Workload Manager for Data Hub clusters created within the environment. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **description** | | A description for the environment. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: desc* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **tunnel** | | Flag to enable SSH tunnelling for the environment. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: enable_tunnel, ssh_tunnel* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **freeipa** | | The FreeIPA service for the environment. | + | | | | + | |br| | | | + | | | | + | ``dict`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **proxy** | | The name of the proxy config to use for the environment. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: proxy_config, proxy_config_name* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **wait** | | Flag to enable internal polling to wait for the environment to achieve the declared state. | + | | | If set to FALSE, the module will return immediately. | + | |br| | | | + | | | | + | ``bool`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **delay** | | The internal polling interval (in seconds) while the module waits for the environment to achieve the declared state. | + | | | | + | |br| | | | + | | | | + | ``int`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: polling_delay* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **timeout** | | The internal polling timeout (in seconds) while the module waits for the environment to achieve the declared state. | + | | | | + | |br| | | | + | | | | + | ``int`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: polling_timeout* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **endpoint_access_scheme** | **Choices:** | (AWS)The scheme for the workload endpoint gateway. PUBLIC creates an external endpoint that can be accessed over the Internet. Defaults to PRIVATE which restricts the traffic to be internal to the VPC / Vnet. Relevant in Private Networks. | + | | - PRIVATE | | + | |br| | - PUBLIC | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **endpoint_access_subnets** | | (AWS) The list of subnet IDs to use for endpoint access gateway. | + | | | | + | |br| | | | + | | | | + | ``list`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **verify_tls** | | Verify the TLS certificates for the CDP endpoint. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: tls* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **debug** | | Capture the CDP SDK debug log. | + | | | | + | |br| | | | + | | | | + | ``bool`` | | | + | | | | + | | | |br| | + | | | | + | | | *Aliases: debug_endpoints* | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **profile** | | If provided, the CDP SDK will use this value as its profile. | + | | | | + | |br| | | | + | | | | + | ``str`` | | | + +-----------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -431,25 +431,6 @@ Common return values are documented here, the following are fields unique to thi | | | | | a_labeled_public_key | | | | | | | +-+-+----------------------------+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | | **awsDetails** | when supported | AWS-specific environment configuration information. | - | | | | | - | | |br| | | | - | | | | | - | | ``dict`` | | | - +-+-+----------------------------+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | | | **s3GuardTableName** | always | The name for the DynamoDB table backing S3Guard. | - | | | | | | - | | | |br| | | | - | | | | | | - | | | ``str`` | | | - | | | | | | - | | | | | |br| | - | | | | | | - | | | | | **Sample:** | - | | | | | | - | | | | | table_name | - | | | | | | - +-+-+----------------------------+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | | **cloudPlatform** | always | Cloud provider of the Environment. | | | | | | | | |br| | | | diff --git a/galaxy.yml b/galaxy.yml index 4e55be6a..b09492c0 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -16,7 +16,7 @@ namespace: cloudera name: cloud -version: 1.3.0 +version: 1.4.0 readme: README.md authors: - Webster Mudge diff --git a/site/conf.py b/site/conf.py index 28962e7c..54125350 100644 --- a/site/conf.py +++ b/site/conf.py @@ -36,7 +36,7 @@ author = 'Webster Mudge' # The full version, including alpha/beta/rc tags -release = '1.1.0' +release = '1.4.0' # -- General configuration --------------------------------------------------- From 69ca9dfa3f129cdddbd52100863e483574e615f4 Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:38 -0400 Subject: [PATCH 03/25] Support CDW DBC and VW creation Signed-off-by: Saravanan Raju --- plugins/modules/dw_cluster.py | 20 +- plugins/modules/dw_dbc.py | 178 +++++++++++++++++ plugins/modules/dw_vw.py | 353 ++++++++++++++++++++++++++++++++++ 3 files changed, 547 insertions(+), 4 deletions(-) create mode 100644 plugins/modules/dw_dbc.py create mode 100644 plugins/modules/dw_vw.py diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index 2fa5f2ed..a38fa10d 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -47,6 +47,16 @@ aliases: - environment - env_crn + overlay: + description: Set it to true to save IP addresses in the VPC by using a private IP address range for Pods in the cluster. + type: bool + required: False + default: False + private_load_balancer: + description: Set up load balancer in private subnets. + type: bool + required: False + default: False aws_public_subnets: description: List of zero or more Public AWS Subnet IDs to deploy to type: list @@ -131,7 +141,7 @@ elements: complex contains: cluster: - tyoe: dict + type: dict contains: name: description: The name of the cluster. @@ -194,6 +204,7 @@ def __init__(self, module): self.name = self._get_param('name') self.env = self._get_param('env') self.overlay = self._get_param('overlay') + self.private_load_balancer = self._get_param('private_load_balancer') self.az_subnet = self._get_param('az_subnet') self.az_enable_az = self._get_param('az_enable_az') self.aws_public_subnets = self._get_param('aws_public_subnets') @@ -281,9 +292,9 @@ def process(self): self.module.fail_json(msg="Could not retrieve CRN for CDP Environment %s" % self.env) else: self.name = self.cdpy.dw.create_cluster( - env_crn=env_crn, overlay=self.overlay, aws_public_subnets=self.aws_public_subnets, - aws_private_subnets=self.aws_private_subnets, az_subnet=self.az_subnet, - az_enable_az=self.az_enable_az + env_crn=env_crn, overlay=self.overlay, private_load_balancer=self.private_load_balancer, + aws_public_subnets=self.aws_public_subnets, aws_private_subnets=self.aws_private_subnets, + az_subnet=self.az_subnet, az_enable_az=self.az_enable_az ) if self.wait: self.target = self.cdpy.sdk.wait_for_state( @@ -304,6 +315,7 @@ def main(): name=dict(required=False, type='str', aliases=['id']), env=dict(required=False, type='str', aliases=['environment', 'env_crn']), overlay=dict(required=False, type='bool', default=False), + private_load_balancer=dict(required=False, type='bool', default=False), az_subnet=dict(required=False, type='str', default=None), az_enable_az=dict(required=False, type='bool', default=None), aws_public_subnets=dict(required=False, type='list', default=None), diff --git a/plugins/modules/dw_dbc.py b/plugins/modules/dw_dbc.py new file mode 100644 index 00000000..6292becf --- /dev/null +++ b/plugins/modules/dw_dbc.py @@ -0,0 +1,178 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2021 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.cloudera.cloud.plugins.module_utils.cdp_common import CdpModule + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + +DOCUMENTATION = r''' +--- +module: dw_dbc +short_description: Create CDP Database Catalog +description: + - Create CDP Database Catalog +author: + - "Webster Mudge (@wmudge)" + - "Dan Chaffelson (@chaffelson)" +requirements: + - cdpy +options: + cluster_id: + description: ID of cluster where Database Catalog should be created. + type: str + required: True + name: + description: Name of the Database Catalog. + type: str + required: True + load_demo_data: + description: Set this to true if you demo data should be loaded into the Database Catalog. + type: str + required: False + wait: + description: + - 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. + type: bool + required: False + default: True + delay: + description: + - The internal polling interval (in seconds) while the module waits for the Data Catalog to achieve the declared + state. + type: int + required: False + default: 15 + aliases: + - polling_delay + timeout: + description: + - The internal polling timeout (in seconds) while the module waits for the Data Catalog to achieve the declared + state. + type: int + required: False + default: 3600 + aliases: + - polling_timeout +extends_documentation_fragment: + - cloudera.cloud.cdp_sdk_options + - cloudera.cloud.cdp_auth_options +''' + +EXAMPLES = r''' +# Note: These examples do not set authentication details. + +# Create Database Catalog +- cloudera.cloud.dw_dbc: + name: example-database-catalog + cluster_id: example-cluster-id +''' + +RETURN = r''' +--- +dbcs: + description: The information about the named Database Catalog. + type: list + returned: always + elements: complex + contains: + id: + description: The id of the Database Catalog. + returned: always + type: str + name: + description: The name of the Database Catalog. + returned: always + type: str + status: + description: The status of the Database Catalog. + returned: always + type: str +sdk_out: + description: Returns the captured CDP SDK log. + returned: when supported + type: str +sdk_out_lines: + description: Returns a list of each line of the captured CDP SDK log. + returned: when supported + type: list + elements: str +''' + + +class DwDbc(CdpModule): + def __init__(self, module): + super(DwDbc, self).__init__(module) + + # Set variables + self.cluster_id = self._get_param('cluster_id') + self.name = self._get_param('name') + self.load_demo_data = self._get_param('load_demo_data') + self.state = self._get_param('state') + self.wait = self._get_param('wait') + self.delay = self._get_param('delay') + self.timeout = self._get_param('timeout') + + # Initialize return values + self.dbcs = [] + + # Execute logic process + self.process() + + @CdpModule._Decorators.process_debug + def process(self): + self.name = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, + load_demo_data=self.load_demo_data) + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_dbc, + params=dict(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']), + state='Running', delay=self.delay, timeout=self.timeout + ) + else: + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']) + self.dbcs.append(self.target) + + +def main(): + module = AnsibleModule( + argument_spec=CdpModule.argument_spec( + cluster_id=dict(required=True, type='str', aliases=['cluster_id']), + name = dict(required=True, type='str', aliases=['name']), + load_demo_data=dict(required=False, type='bool', aliases=['load_demo_data']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), + wait = dict(required=False, type='bool', default=True), + delay = dict(required=False, type='int', aliases=['polling_delay'], default=15), + timeout = dict(required=False, type='int', aliases=['polling_timeout'], default=3600) + ), + supports_check_mode=True + ) + + result = DwDbc(module) + output = dict(changed=False, dbcs=result.dbcs) + + if result.debug: + output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) + + module.exit_json(**output) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/dw_vw.py b/plugins/modules/dw_vw.py new file mode 100644 index 00000000..fef7163b --- /dev/null +++ b/plugins/modules/dw_vw.py @@ -0,0 +1,353 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2021 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.cloudera.cloud.plugins.module_utils.cdp_common import CdpModule + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + +DOCUMENTATION = r''' +--- +module: dw_vw +short_description: Create CDP Virtual Warehouse +description: + - Create CDP Virtual Warehouse +author: + - "Webster Mudge (@wmudge)" + - "Dan Chaffelson (@chaffelson)" +requirements: + - cdpy +options: + cluster_id: + description: ID of cluster where Virtual Warehouse should be created. + type: str + required: True + dbc_id: + description: ID of Database Catalog that the Virtual Warehouse should be attached to. + type: str + required: True + vw_type: + description: Type of Virtual Warehouse to be created. + type: str + required: True + name: + description: Name of the Virtual Warehouse. + type: str + required: True + template: + description: Name of configuration template to use. + type: str + required: False + autoscaling_min_cluster: + description: Minimum number of available nodes for Virtual Warehouse autoscaling. + type: int + required: False + autoscaling_max_cluster: + description: Maximum number of available nodes for Virtual Warehouse autoscaling. + type: int + required: False + config: + description: Configuration settings for the Virtual Warehouse. + type: dict + required: False + contains: + commonConfigs: + description: Configurations that are applied to every application in the service. + type: dict + required: False + contains: + configBlocks: List of ConfigBlocks for the application. + type: list + required: False + contains: + id: + description: ID of the ConfigBlock. Unique within an ApplicationConfig. + type: str + required: False + format: + description: Format of ConfigBlock. + type: str + required: False + content: + description: Contents of a ConfigBlock. + type: obj + required: False + contains: + keyValues: + description: Key-value type configurations. + type: obj + required: False + contains: + additionalProperties: + description: Key-value type configurations. + type: str + required: False + text: + description: Text type configuration. + type: str + required: False + json: + description: JSON type configuration. + type: str + required: False + applicationConfigs: + description: Application specific configurations. + type: dict + required: False + contains: + configBlocks: List of ConfigBlocks for the application. + type: list + required: False + contains: + id: + description: ID of the ConfigBlock. Unique within an ApplicationConfig. + type: str + required: False + format: + description: Format of ConfigBlock. + type: str + required: False + content: + description: Contents of a ConfigBlock. + type: obj + required: False + contains: + keyValues: + description: Key-value type configurations. + type: obj + required: False + contains: + additionalProperties: + description: Key-value type configurations. + type: str + required: False + text: + description: Text type configuration. + type: str + required: False + json: + description: JSON type configuration. + type: str + required: False + ldapGroups: + description: LDAP Groupnames to be enabled for auth. + type: list + required: False + enableSSO: + description: Should SSO be enabled for this VW. + type: bool + required: False + tags: + description: Tags associated with the resources. + type: dict + required: False + wait: + description: + - 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. + type: bool + required: False + default: True + delay: + description: + - The internal polling interval (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared + state. + type: int + required: False + default: 15 + aliases: + - polling_delay + timeout: + description: + - The internal polling timeout (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared + state. + type: int + required: False + default: 3600 + aliases: + - polling_timeout +extends_documentation_fragment: + - cloudera.cloud.cdp_sdk_options + - cloudera.cloud.cdp_auth_options +''' + +EXAMPLES = r''' +# Note: These examples do not set authentication details. + +# Create Virtual Warehouse +- cloudera.cloud.dw_vw: + name: "example-virtual-warehouse" + vw_type: "hive" + template: "xsmall" + autoscaling: + min_cluster: 3 + max_cluster: 19 + tags: + tag-key: "tag-value" + configs: + enable_sso: true + ldap_groups: ['group1','group2','group3'] +''' + +RETURN = r''' +--- +vws: + description: The information about the named CDW Virtual Warehouses. + type: list + returned: always + elements: complex + contains: + vws: + type: dict + contains: + id: + description: Id of the Virtual Warehouse created. + returned: always + type: str + name: + description: Name of the Virtual Warehouse created. + returned: always + type: str + vwType: + description: Virtual Warehouse type. + returned: always + type: str + dbcId: + description: Database Catalog ID against which Virtual Warehouse was created. + returned: always + type: str + creationDate: + description: The creation time of the cluster in UTC. + returned: always + type: str + status: + description: The status of the Virtual Warehouse. + returned: always + type: str + creator: + description: The CRN of the cluster creator. + returned: always + type: dict + contains: + crn: + type: str + description: Actor CRN + email: + type: str + description: Email address for users + workloadUsername: + type: str + description: Username for users + machineUsername: + type: str + description: Username for machine users + tags: + description: Custom tags that were used to create this Virtual Warehouse. + returned: always + type: dict +sdk_out: + description: Returns the captured CDP SDK log. + returned: when supported + type: str +sdk_out_lines: + description: Returns a list of each line of the captured CDP SDK log. + returned: when supported + type: list + elements: str +''' + + +class DwVw(CdpModule): + def __init__(self, module): + super(DwVw, self).__init__(module) + + # Set variables + self.cluster_id = self._get_param('cluster_id') + self.dbc_id = self._get_param('dbc_id') + self.vw_type = self._get_param('vw_type') + self.name = self._get_param('name') + self.template = self._get_param('template') + self.autoscaling_min_cluster = self._get_param('autoscaling_min_cluster') + self.autoscaling_max_cluster = self._get_param('autoscaling_max_cluster') + self.common_configs = self._get_param('common_configs') + self.application_configs = self._get_param('application_configs') + self.ldap_groups = self._get_param('ldap_groups') + self.enable_sso = self._get_param('enable_sso') + self.tags = self._get_param('tags') + self.wait = self._get_param('wait') + self.delay = self._get_param('delay') + self.timeout = self._get_param('timeout') + + # Initialize return values + self.vws = [] + + # Execute logic process + self.process() + + @CdpModule._Decorators.process_debug + def process(self): + self.name = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, dbc_id=self.dbc_id, vw_type=self.vw_type, name=self.name, + template=self.template, autoscaling_min_cluster=self.autoscaling_min_cluster, + autoscaling_max_cluster=self.autoscaling_max_cluster, + common_configs=self.common_configs, application_configs=self.application_configs, + ldap_groups=self.ldap_groups, enable_sso=self.enable_sso, tags=self.tags) + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_vw, + params=dict(cluster_id=self.cluster_id, vw_id=self.name), + state='Running', delay=self.delay, timeout=self.timeout + ) + else: + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.vw_id) + self.vws.append(self.target) + + +def main(): + module = AnsibleModule( + argument_spec=CdpModule.argument_spec( + cluster_id=dict(required=True, type='str', aliases=['cluster_id']), + dbc_id=dict(required=True, type='str', aliases=['dbc_id']), + vw_type = dict(required=True, type='str', aliases=['vw_type']), + name = dict(required=True, type='str', aliases=['name']), + template=dict(required=False, type='str', aliases=['template']), + autoscaling_min_cluster=dict(required=False, type='int', aliases=['autoscaling_min_cluster']), + autoscaling_max_cluster=dict(required=False, type='int', aliases=['autoscaling_max_cluster']), + common_configs=dict(required=False, type='dict', aliases=['common_configs']), + application_configs=dict(required=False, type='dict', aliases=['application_configs']), + ldap_groups=dict(required=False, type='list', aliases=['ldap_groups']), + enable_sso=dict(required=False, type='bool', aliases=['enable_sso']), + tags=dict(required=False, type='dict', aliases=['tags']), + wait = dict(required=False, type='bool', default=True), + delay = dict(required=False, type='int', aliases=['polling_delay'], default=15), + timeout = dict(required=False, type='int', aliases=['polling_timeout'], default=3600) + ), + supports_check_mode=True + ) + + result = DwVw(module) + output = dict(changed=False, vws=result.vws) + + if result.debug: + output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) + + module.exit_json(**output) + + +if __name__ == '__main__': + main() From 9202f72fe866edb607b047dbc71e2dac07a098fc Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:39 -0400 Subject: [PATCH 04/25] Fix class docs Signed-off-by: Saravanan Raju --- plugins/modules/dw_dbc.py | 2 +- plugins/modules/dw_vw.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/dw_dbc.py b/plugins/modules/dw_dbc.py index 6292becf..6184200e 100644 --- a/plugins/modules/dw_dbc.py +++ b/plugins/modules/dw_dbc.py @@ -25,7 +25,7 @@ DOCUMENTATION = r''' --- module: dw_dbc -short_description: Create CDP Database Catalog +short_description: Create CDP Data Warehouse Database Catalog description: - Create CDP Database Catalog author: diff --git a/plugins/modules/dw_vw.py b/plugins/modules/dw_vw.py index fef7163b..7d9be1d0 100644 --- a/plugins/modules/dw_vw.py +++ b/plugins/modules/dw_vw.py @@ -25,7 +25,7 @@ DOCUMENTATION = r''' --- module: dw_vw -short_description: Create CDP Virtual Warehouse +short_description: Create CDP Data Warehouse Virtual Warehouse description: - Create CDP Virtual Warehouse author: From 9a5dae29504c89df9ccfb58ee75fd8e94106006e Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:39 -0400 Subject: [PATCH 05/25] Make vw and dbc modules idempotent Signed-off-by: Saravanan Raju --- plugins/modules/dw_dbc.py | 81 ++++++++++++++++++++++++++---- plugins/modules/dw_vw.py | 103 +++++++++++++++++++++++++++++++++----- 2 files changed, 162 insertions(+), 22 deletions(-) diff --git a/plugins/modules/dw_dbc.py b/plugins/modules/dw_dbc.py index 6184200e..d3804bc3 100644 --- a/plugins/modules/dw_dbc.py +++ b/plugins/modules/dw_dbc.py @@ -31,6 +31,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" + - "Saravanan Raju (@raju-saravanan)" requirements: - cdpy options: @@ -83,6 +84,12 @@ - cloudera.cloud.dw_dbc: name: example-database-catalog cluster_id: example-cluster-id + +# Delete Database Catalog +- cloudera.cloud.dw_dbc: + name: example-database-catalog + cluster_id: example-cluster-id + state: absent ''' RETURN = r''' @@ -133,22 +140,76 @@ def __init__(self, module): # Initialize return values self.dbcs = [] + # Initialize internal values + self.target = None + # Execute logic process self.process() @CdpModule._Decorators.process_debug def process(self): - self.name = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, - load_demo_data=self.load_demo_data) - if self.wait: - self.target = self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_dbc, - params=dict(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']), - state='Running', delay=self.delay, timeout=self.timeout - ) + cluster = self.cdpy.dw.describe_cluster(cluster_id=self.cluster_id) + if cluster is None: + self.module.fail_json(msg="Couldn't retrieve cluster info for %s " % self.cluster_id) else: - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']) - self.dbcs.append(self.target) + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name) + # If Database Catalog exists + if self.target is not None: + if self.state == 'absent': + if self.module.check_mode: + self.clusters.append(self.target) + else: + if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: + self.module.warn( + "DW Database Catalog not in valid state for Delete operation: %s" % self.target['status']) + else: + _ = self.cdpy.dw.delete_dbc(cluster_id=self.cluster_id, dbc_id=self.name) + if self.wait: + self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_dbc, + params=dict(cluster_id=self.cluster_id, dbc_id=self.name), + field=None, delay=self.delay, timeout=self.timeout + ) + else: + self.cdpy.sdk.sleep(3) # Wait for consistency sync + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name) + self.clusters.append(self.target) + # Drop Done + elif self.state == 'present': + # Begin Config check + self.module.warn("DW Database Catalog already present and config validation is not implemented") + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_dbc, + params=dict(cluster_id=self.cluster_id,dbc_id=self.name), + state='Running', delay=self.delay, timeout=self.timeout + ) + self.clusters.append(self.target) + # End Config check + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) + # End handling Database Catalog exists + else: + # Begin handling Database Catalog not found + if self.state == 'absent': + self.module.warn("DW Database Catalog %s already absent in Cluster %s" % (self.name, self.cluster_id)) + elif self.state == 'present': + if self.module.check_mode: + pass + else: + self.name = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, + load_demo_data=self.load_demo_data) + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_dbc, + params=dict(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']), + state='Running', delay=self.delay, timeout=self.timeout + ) + else: + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']) + self.dbcs.append(self.target) + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) def main(): diff --git a/plugins/modules/dw_vw.py b/plugins/modules/dw_vw.py index 7d9be1d0..c39d3237 100644 --- a/plugins/modules/dw_vw.py +++ b/plugins/modules/dw_vw.py @@ -31,6 +31,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" + - "Saravanan Raju (@raju-saravanan)" requirements: - cdpy options: @@ -157,6 +158,14 @@ description: Tags associated with the resources. type: dict required: False + state: + description: The declarative state of the Virtual Warehouse + type: str + required: False + default: present + choices: + - present + - absent wait: description: - Flag to enable internal polling to wait for the Data Warehouse Cluster to achieve the declared state. @@ -192,6 +201,7 @@ # Create Virtual Warehouse - cloudera.cloud.dw_vw: + cluster_id: "example-cluster-id" name: "example-virtual-warehouse" vw_type: "hive" template: "xsmall" @@ -203,6 +213,12 @@ configs: enable_sso: true ldap_groups: ['group1','group2','group3'] + +# Delete Virtual Warehouse +- cloudera.cloud.dw_vw: + cluster_id: "example-cluster-id" + name: "example-virtual-warehouse" + state: absent ''' RETURN = r''' @@ -289,6 +305,7 @@ def __init__(self, module): self.application_configs = self._get_param('application_configs') self.ldap_groups = self._get_param('ldap_groups') self.enable_sso = self._get_param('enable_sso') + self.state = self._get_param('state') self.tags = self._get_param('tags') self.wait = self._get_param('wait') self.delay = self._get_param('delay') @@ -297,33 +314,94 @@ def __init__(self, module): # Initialize return values self.vws = [] + # Initialize internal values + self.target = None + # Execute logic process self.process() @CdpModule._Decorators.process_debug def process(self): - self.name = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, dbc_id=self.dbc_id, vw_type=self.vw_type, name=self.name, + cluster = self.cdpy.dw.describe_cluster(cluster_id=self.cluster_id) + if cluster is None: + self.module.fail_json(msg="Couldn't retrieve cluster info for %s " % self.cluster_id) + else: + dbc = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.dbc_id) + if dbc is None: + self.module.fail_json(msg="Couldn't retrieve dbc info for %s " % self.dbc_id) + else: + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.name) + # If Virtual Warehouse exists + if self.target is not None: + if self.state == 'absent': + if self.module.check_mode: + self.clusters.append(self.target) + else: + if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: + self.module.warn( + "DW Virtual Warehouse not in valid state for Delete operation: %s" % self.target[ + 'status']) + else: + _ = self.cdpy.dw.delete_vw(cluster_id=self.cluster_id, vw_id=self.name) + if self.wait: + self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_vw, + params=dict(cluster_id=self.cluster_id, vw_id=self.name), + field=None, delay=self.delay, timeout=self.timeout + ) + else: + self.cdpy.sdk.sleep(3) # Wait for consistency sync + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.name) + self.clusters.append(self.target) + # Drop Done + elif self.state == 'present': + # Begin Config check + self.module.warn("DW Virtual Warehouse already present and config validation is not implemented") + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.delete_vw, + params=dict(cluster_id=self.cluster_id, vw_id=self.name), + state='Running', delay=self.delay, timeout=self.timeout + ) + self.clusters.append(self.target) + # End Config check + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) + # End handling Virtual Warehouse exists + else: + # Begin handling Virtual Warehouse not found + if self.state == 'absent': + self.module.warn( + "DW Virtual Warehouse %s already absent in Cluster %s" % (self.name, self.cluster_id)) + elif self.state == 'present': + if self.module.check_mode: + pass + else: + self.name = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, + dbc_id=self.dbc_id, vw_type=self.vw_type, name=self.name, template=self.template, autoscaling_min_cluster=self.autoscaling_min_cluster, autoscaling_max_cluster=self.autoscaling_max_cluster, common_configs=self.common_configs, application_configs=self.application_configs, ldap_groups=self.ldap_groups, enable_sso=self.enable_sso, tags=self.tags) - if self.wait: - self.target = self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_vw, - params=dict(cluster_id=self.cluster_id, vw_id=self.name), - state='Running', delay=self.delay, timeout=self.timeout - ) - else: - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.vw_id) - self.vws.append(self.target) + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_vw, + params=dict(cluster_id=self.cluster_id, vw_id=self.name), + state='Running', delay=self.delay, timeout=self.timeout + ) + else: + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.vw_id) + self.vws.append(self.target) + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( cluster_id=dict(required=True, type='str', aliases=['cluster_id']), - dbc_id=dict(required=True, type='str', aliases=['dbc_id']), - vw_type = dict(required=True, type='str', aliases=['vw_type']), + dbc_id=dict(required=False, type='str', aliases=['dbc_id']), + vw_type = dict(required=False, type='str', aliases=['vw_type']), name = dict(required=True, type='str', aliases=['name']), template=dict(required=False, type='str', aliases=['template']), autoscaling_min_cluster=dict(required=False, type='int', aliases=['autoscaling_min_cluster']), @@ -333,6 +411,7 @@ def main(): ldap_groups=dict(required=False, type='list', aliases=['ldap_groups']), enable_sso=dict(required=False, type='bool', aliases=['enable_sso']), tags=dict(required=False, type='dict', aliases=['tags']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), wait = dict(required=False, type='bool', default=True), delay = dict(required=False, type='int', aliases=['polling_delay'], default=15), timeout = dict(required=False, type='int', aliases=['polling_timeout'], default=3600) From 92d8568f5397f0458befb0bd825e12adf83e4e4f Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:40 -0400 Subject: [PATCH 06/25] Make the dbc and vw module idempotent Signed-off-by: Saravanan Raju --- plugins/modules/dw_dbc.py | 135 ++++++++++++++++-------------- plugins/modules/dw_vw.py | 172 ++++++++++++++++++++------------------ 2 files changed, 162 insertions(+), 145 deletions(-) diff --git a/plugins/modules/dw_dbc.py b/plugins/modules/dw_dbc.py index d3804bc3..41ef2555 100644 --- a/plugins/modules/dw_dbc.py +++ b/plugins/modules/dw_dbc.py @@ -35,6 +35,11 @@ requirements: - cdpy options: + id: + description: + - If an ID is provided, that Database Catalog will be deleted if C(state=absent) + type: str + required: When state is absent cluster_id: description: ID of cluster where Database Catalog should be created. type: str @@ -82,14 +87,14 @@ # Create Database Catalog - cloudera.cloud.dw_dbc: - name: example-database-catalog - cluster_id: example-cluster-id + name: "example-database-catalog-name" + cluster_id: "example-cluster-id" # Delete Database Catalog - cloudera.cloud.dw_dbc: - name: example-database-catalog - cluster_id: example-cluster-id - state: absent + id: "example-database-id" + cluster_id: "example-cluster-id" + state: "absent" ''' RETURN = r''' @@ -129,6 +134,7 @@ def __init__(self, module): super(DwDbc, self).__init__(module) # Set variables + self.id = self._get_param('id') self.cluster_id = self._get_param('cluster_id') self.name = self._get_param('name') self.load_demo_data = self._get_param('load_demo_data') @@ -148,76 +154,79 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): - cluster = self.cdpy.dw.describe_cluster(cluster_id=self.cluster_id) - if cluster is None: - self.module.fail_json(msg="Couldn't retrieve cluster info for %s " % self.cluster_id) - else: - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name) - # If Database Catalog exists - if self.target is not None: - if self.state == 'absent': - if self.module.check_mode: - self.clusters.append(self.target) + if self.id is None: + dbcs = self.cdpy.dw.list_dbcs(cluster_id=self.cluster_id) + for dbc in dbcs: + if self.name is not None and dbc['name'] == self.name: + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc['id']) + elif self.id is not None and dbc['id'] == self.id: + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.id) + # If Database Catalog exists + if self.target is not None: + if self.state == 'absent': + if self.module.check_mode: + self.dbcs.append(self.target) + else: + if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: + self.module.warn( + "DW Database Catalog not in valid state for Delete operation: %s" % self.target['status']) else: - if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: - self.module.warn( - "DW Database Catalog not in valid state for Delete operation: %s" % self.target['status']) - else: - _ = self.cdpy.dw.delete_dbc(cluster_id=self.cluster_id, dbc_id=self.name) - if self.wait: - self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_dbc, - params=dict(cluster_id=self.cluster_id, dbc_id=self.name), - field=None, delay=self.delay, timeout=self.timeout - ) - else: - self.cdpy.sdk.sleep(3) # Wait for consistency sync - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name) - self.clusters.append(self.target) - # Drop Done - elif self.state == 'present': - # Begin Config check - self.module.warn("DW Database Catalog already present and config validation is not implemented") + _ = self.cdpy.dw.delete_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) if self.wait: - self.target = self.cdpy.sdk.wait_for_state( + self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, - params=dict(cluster_id=self.cluster_id,dbc_id=self.name), - state='Running', delay=self.delay, timeout=self.timeout + params=dict(cluster_id=self.cluster_id, dbc_id=self.target['id']), + field=None, delay=self.delay, timeout=self.timeout ) - self.clusters.append(self.target) - # End Config check - else: - self.module.fail_json(msg="State %s is not valid for this module" % self.state) - # End handling Database Catalog exists - else: - # Begin handling Database Catalog not found - if self.state == 'absent': - self.module.warn("DW Database Catalog %s already absent in Cluster %s" % (self.name, self.cluster_id)) - elif self.state == 'present': - if self.module.check_mode: - pass else: - self.name = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, - load_demo_data=self.load_demo_data) - if self.wait: - self.target = self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_dbc, - params=dict(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']), - state='Running', delay=self.delay, timeout=self.timeout - ) - else: - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.name['dbcId']) + self.cdpy.sdk.sleep(3) # Wait for consistency sync + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) self.dbcs.append(self.target) + # Drop Done + elif self.state == 'present': + # Begin Config check + self.module.warn("DW Database Catalog already present and config validation is not implemented") + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_dbc, + params=dict(cluster_id=self.cluster_id, dbc_id=self.target['id']), + state='Running', delay=self.delay, timeout=self.timeout + ) + self.dbcs.append(self.target) + # End Config check + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) + # End handling Database Catalog exists + else: + # Begin handling Database Catalog not found + if self.state == 'absent': + self.module.warn("DW Database Catalog %s already absent in Cluster %s" % (self.name, self.cluster_id)) + elif self.state == 'present': + if self.module.check_mode: + pass else: - self.module.fail_json(msg="State %s is not valid for this module" % self.state) + dbc_id = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, + load_demo_data=self.load_demo_data) + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_dbc, + params=dict(cluster_id=self.cluster_id, dbc_id=dbc_id), + state='Running', delay=self.delay, timeout=self.timeout + ) + else: + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc_id) + self.dbcs.append(self.target) + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - cluster_id=dict(required=True, type='str', aliases=['cluster_id']), - name = dict(required=True, type='str', aliases=['name']), - load_demo_data=dict(required=False, type='bool', aliases=['load_demo_data']), + id=dict(required=False, type='str', default=None), + cluster_id=dict(required=True, type='str'), + name = dict(required=False, type='str', default=None), + load_demo_data=dict(required=False, type='bool', default=False), state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), wait = dict(required=False, type='bool', default=True), delay = dict(required=False, type='int', aliases=['polling_delay'], default=15), diff --git a/plugins/modules/dw_vw.py b/plugins/modules/dw_vw.py index c39d3237..01e3835c 100644 --- a/plugins/modules/dw_vw.py +++ b/plugins/modules/dw_vw.py @@ -35,6 +35,11 @@ requirements: - cdpy options: + id: + description: + - If an ID is provided, that Virtual Warehouse will be deleted if C(state=absent) + type: str + required: When state is absent cluster_id: description: ID of cluster where Virtual Warehouse should be created. type: str @@ -217,7 +222,7 @@ # Delete Virtual Warehouse - cloudera.cloud.dw_vw: cluster_id: "example-cluster-id" - name: "example-virtual-warehouse" + id: "example-virtual-warehouse-id" state: absent ''' @@ -294,6 +299,7 @@ def __init__(self, module): super(DwVw, self).__init__(module) # Set variables + self.id = self._get_param('id') self.cluster_id = self._get_param('cluster_id') self.dbc_id = self._get_param('dbc_id') self.vw_type = self._get_param('vw_type') @@ -322,95 +328,97 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): - cluster = self.cdpy.dw.describe_cluster(cluster_id=self.cluster_id) - if cluster is None: - self.module.fail_json(msg="Couldn't retrieve cluster info for %s " % self.cluster_id) - else: - dbc = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.dbc_id) - if dbc is None: - self.module.fail_json(msg="Couldn't retrieve dbc info for %s " % self.dbc_id) - else: - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.name) - # If Virtual Warehouse exists - if self.target is not None: - if self.state == 'absent': - if self.module.check_mode: - self.clusters.append(self.target) - else: - if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: - self.module.warn( - "DW Virtual Warehouse not in valid state for Delete operation: %s" % self.target[ - 'status']) - else: - _ = self.cdpy.dw.delete_vw(cluster_id=self.cluster_id, vw_id=self.name) - if self.wait: - self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_vw, - params=dict(cluster_id=self.cluster_id, vw_id=self.name), - field=None, delay=self.delay, timeout=self.timeout - ) - else: - self.cdpy.sdk.sleep(3) # Wait for consistency sync - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.name) - self.clusters.append(self.target) - # Drop Done - elif self.state == 'present': - # Begin Config check - self.module.warn("DW Virtual Warehouse already present and config validation is not implemented") - if self.wait: - self.target = self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.delete_vw, - params=dict(cluster_id=self.cluster_id, vw_id=self.name), - state='Running', delay=self.delay, timeout=self.timeout - ) - self.clusters.append(self.target) - # End Config check - else: - self.module.fail_json(msg="State %s is not valid for this module" % self.state) - # End handling Virtual Warehouse exists + if self.id is None: + vws = self.cdpy.dw.list_vws(cluster_id=self.cluster_id) + for vw in vws: + if self.name is not None and vw['name'] == self.name: + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw['id']) + elif self.id is not None and vw['id'] == self.id: + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.id) + # If Virtual Warehouse exists + if self.target is not None: + if self.state == 'absent': + if self.module.check_mode: + self.vws.append(self.target) else: - # Begin handling Virtual Warehouse not found - if self.state == 'absent': + if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( - "DW Virtual Warehouse %s already absent in Cluster %s" % (self.name, self.cluster_id)) - elif self.state == 'present': - if self.module.check_mode: - pass - else: - self.name = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, - dbc_id=self.dbc_id, vw_type=self.vw_type, name=self.name, - template=self.template, autoscaling_min_cluster=self.autoscaling_min_cluster, - autoscaling_max_cluster=self.autoscaling_max_cluster, - common_configs=self.common_configs, application_configs=self.application_configs, - ldap_groups=self.ldap_groups, enable_sso=self.enable_sso, tags=self.tags) - if self.wait: - self.target = self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_vw, - params=dict(cluster_id=self.cluster_id, vw_id=self.name), - state='Running', delay=self.delay, timeout=self.timeout - ) - else: - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.vw_id) - self.vws.append(self.target) + "DW Virtual Warehouse not in valid state for Delete operation: %s" % self.target[ + 'status']) else: - self.module.fail_json(msg="State %s is not valid for this module" % self.state) + _ = self.cdpy.dw.delete_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) + if self.wait: + self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_vw, + params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), + field=None, delay=self.delay, timeout=self.timeout + ) + else: + self.cdpy.sdk.sleep(3) # Wait for consistency sync + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) + self.vws.append(self.target) + # Drop Done + elif self.state == 'present': + # Begin Config check + self.module.warn("DW Virtual Warehouse already present and config validation is not implemented") + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.delete_vw, + params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), + state='Running', delay=self.delay, timeout=self.timeout + ) + self.vws.append(self.target) + # End Config check + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) + # End handling Virtual Warehouse exists + else: + # Begin handling Virtual Warehouse not found + if self.state == 'absent': + self.module.warn( + "DW Virtual Warehouse %s already absent in Cluster %s" % (self.name, self.cluster_id)) + elif self.state == 'present': + if self.module.check_mode: + pass + else: + vw_id = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, + dbc_id=self.dbc_id, vw_type=self.vw_type, name=self.name, + template=self.template, + autoscaling_min_cluster=self.autoscaling_min_cluster, + autoscaling_max_cluster=self.autoscaling_max_cluster, + common_configs=self.common_configs, + application_configs=self.application_configs, + ldap_groups=self.ldap_groups, enable_sso=self.enable_sso, + tags=self.tags) + if self.wait: + self.target = self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_vw, + params=dict(cluster_id=self.cluster_id, vw_id=vw_id), + state='Running', delay=self.delay, timeout=self.timeout + ) + else: + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw_id) + self.vws.append(self.target) + else: + self.module.fail_json(msg="State %s is not valid for this module" % self.state) def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - cluster_id=dict(required=True, type='str', aliases=['cluster_id']), - dbc_id=dict(required=False, type='str', aliases=['dbc_id']), - vw_type = dict(required=False, type='str', aliases=['vw_type']), - name = dict(required=True, type='str', aliases=['name']), - template=dict(required=False, type='str', aliases=['template']), - autoscaling_min_cluster=dict(required=False, type='int', aliases=['autoscaling_min_cluster']), - autoscaling_max_cluster=dict(required=False, type='int', aliases=['autoscaling_max_cluster']), - common_configs=dict(required=False, type='dict', aliases=['common_configs']), - application_configs=dict(required=False, type='dict', aliases=['application_configs']), - ldap_groups=dict(required=False, type='list', aliases=['ldap_groups']), - enable_sso=dict(required=False, type='bool', aliases=['enable_sso']), - tags=dict(required=False, type='dict', aliases=['tags']), + id=dict(required=False, type='str', default=None), + cluster_id=dict(required=True, type='str'), + dbc_id=dict(required=False, type='str', default=None), + vw_type = dict(required=False, type='str', default=None), + name = dict(required=False, type='str', default=None), + template=dict(required=False, type='str', default=None), + autoscaling_min_cluster=dict(required=False, type='int', default=None), + autoscaling_max_cluster=dict(required=False, type='int', default=None), + common_configs=dict(required=False, type='dict', default=None), + application_configs=dict(required=False, type='dict', default=None), + ldap_groups=dict(required=False, type='list', default=None), + enable_sso=dict(required=False, type='bool', default=False), + tags=dict(required=False, type='dict', default=None), state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), wait = dict(required=False, type='bool', default=True), delay = dict(required=False, type='int', aliases=['polling_delay'], default=15), From 9e82a7031066bfd181e44e487d897863333d84e1 Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:40 -0400 Subject: [PATCH 07/25] Use started state in wait for state function Signed-off-by: Saravanan Raju --- plugins/modules/dw_dbc.py | 4 ++-- plugins/modules/dw_vw.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/dw_dbc.py b/plugins/modules/dw_dbc.py index 41ef2555..8bb9d046 100644 --- a/plugins/modules/dw_dbc.py +++ b/plugins/modules/dw_dbc.py @@ -190,7 +190,7 @@ def process(self): self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, params=dict(cluster_id=self.cluster_id, dbc_id=self.target['id']), - state='Running', delay=self.delay, timeout=self.timeout + state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) self.dbcs.append(self.target) # End Config check @@ -211,7 +211,7 @@ def process(self): self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, params=dict(cluster_id=self.cluster_id, dbc_id=dbc_id), - state='Running', delay=self.delay, timeout=self.timeout + state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) else: self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc_id) diff --git a/plugins/modules/dw_vw.py b/plugins/modules/dw_vw.py index 01e3835c..bf19b8b9 100644 --- a/plugins/modules/dw_vw.py +++ b/plugins/modules/dw_vw.py @@ -365,7 +365,7 @@ def process(self): self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.delete_vw, params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), - state='Running', delay=self.delay, timeout=self.timeout + state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) self.vws.append(self.target) # End Config check @@ -394,7 +394,7 @@ def process(self): self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, params=dict(cluster_id=self.cluster_id, vw_id=vw_id), - state='Running', delay=self.delay, timeout=self.timeout + state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) else: self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw_id) From 0edfa73c755ae5b2c4e887686073eeb07fa102f0 Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:40 -0400 Subject: [PATCH 08/25] Fix typo Signed-off-by: Saravanan Raju --- plugins/modules/dw_vw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/dw_vw.py b/plugins/modules/dw_vw.py index bf19b8b9..4491c9b3 100644 --- a/plugins/modules/dw_vw.py +++ b/plugins/modules/dw_vw.py @@ -363,7 +363,7 @@ def process(self): self.module.warn("DW Virtual Warehouse already present and config validation is not implemented") if self.wait: self.target = self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.delete_vw, + describe_func=self.cdpy.dw.describe_vw, params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) From afbcde7164bb352f450a374373a8f6c335c9e5be Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:40 -0400 Subject: [PATCH 09/25] Rename vh and dbc module Signed-off-by: Saravanan Raju --- .../{dw_dbc.py => dw_database_catalog.py} | 22 +- .../{dw_vw.py => dw_virtual_warehouse.py} | 225 +++++++++--------- 2 files changed, 120 insertions(+), 127 deletions(-) rename plugins/modules/{dw_dbc.py => dw_database_catalog.py} (93%) rename plugins/modules/{dw_vw.py => dw_virtual_warehouse.py} (73%) diff --git a/plugins/modules/dw_dbc.py b/plugins/modules/dw_database_catalog.py similarity index 93% rename from plugins/modules/dw_dbc.py rename to plugins/modules/dw_database_catalog.py index 8bb9d046..bfecbe4e 100644 --- a/plugins/modules/dw_dbc.py +++ b/plugins/modules/dw_database_catalog.py @@ -24,7 +24,7 @@ DOCUMENTATION = r''' --- -module: dw_dbc +module: dw_database_catalog short_description: Create CDP Data Warehouse Database Catalog description: - Create CDP Database Catalog @@ -86,12 +86,12 @@ # Note: These examples do not set authentication details. # Create Database Catalog -- cloudera.cloud.dw_dbc: +- cloudera.cloud.dw_database_catalog: name: "example-database-catalog-name" cluster_id: "example-cluster-id" # Delete Database Catalog -- cloudera.cloud.dw_dbc: +- cloudera.cloud.dw_database_catalog: id: "example-database-id" cluster_id: "example-cluster-id" state: "absent" @@ -99,7 +99,7 @@ RETURN = r''' --- -dbcs: +database_catalogs: description: The information about the named Database Catalog. type: list returned: always @@ -144,7 +144,7 @@ def __init__(self, module): self.timeout = self._get_param('timeout') # Initialize return values - self.dbcs = [] + self.database_catalogs = [] # Initialize internal values self.target = None @@ -165,7 +165,7 @@ def process(self): if self.target is not None: if self.state == 'absent': if self.module.check_mode: - self.dbcs.append(self.target) + self.database_catalogs.append(self.target) else: if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( @@ -179,9 +179,9 @@ def process(self): field=None, delay=self.delay, timeout=self.timeout ) else: - self.cdpy.sdk.sleep(3) # Wait for consistency sync + self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) - self.dbcs.append(self.target) + self.database_catalogs.append(self.target) # Drop Done elif self.state == 'present': # Begin Config check @@ -192,7 +192,7 @@ def process(self): params=dict(cluster_id=self.cluster_id, dbc_id=self.target['id']), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) - self.dbcs.append(self.target) + self.database_catalogs.append(self.target) # End Config check else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) @@ -215,7 +215,7 @@ def process(self): ) else: self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc_id) - self.dbcs.append(self.target) + self.database_catalogs.append(self.target) else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) @@ -236,7 +236,7 @@ def main(): ) result = DwDbc(module) - output = dict(changed=False, dbcs=result.dbcs) + output = dict(changed=False, database_catalogs=result.database_catalogs) if result.debug: output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) diff --git a/plugins/modules/dw_vw.py b/plugins/modules/dw_virtual_warehouse.py similarity index 73% rename from plugins/modules/dw_vw.py rename to plugins/modules/dw_virtual_warehouse.py index 4491c9b3..9ba59041 100644 --- a/plugins/modules/dw_vw.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -24,7 +24,7 @@ DOCUMENTATION = r''' --- -module: dw_vw +module: dw_virtual_warehouse short_description: Create CDP Data Warehouse Virtual Warehouse description: - Create CDP Virtual Warehouse @@ -48,7 +48,7 @@ description: ID of Database Catalog that the Virtual Warehouse should be attached to. type: str required: True - vw_type: + type: description: Type of Virtual Warehouse to be created. type: str required: True @@ -60,105 +60,100 @@ description: Name of configuration template to use. type: str required: False - autoscaling_min_cluster: + autoscaling_min_nodes: description: Minimum number of available nodes for Virtual Warehouse autoscaling. type: int required: False - autoscaling_max_cluster: + autoscaling_max_nodes: description: Maximum number of available nodes for Virtual Warehouse autoscaling. type: int required: False - config: - description: Configuration settings for the Virtual Warehouse. + common_configs: + description: Configurations that are applied to every application in the service. type: dict required: False contains: - commonConfigs: - description: Configurations that are applied to every application in the service. - type: dict - required: False + configBlocks: List of ConfigBlocks for the application. + type: list + required: False contains: - configBlocks: List of ConfigBlocks for the application. - type: list - required: False - contains: - id: - description: ID of the ConfigBlock. Unique within an ApplicationConfig. - type: str - required: False - format: - description: Format of ConfigBlock. - type: str - required: False - content: - description: Contents of a ConfigBlock. - type: obj - required: False - contains: - keyValues: - description: Key-value type configurations. - type: obj - required: False - contains: - additionalProperties: - description: Key-value type configurations. - type: str - required: False - text: - description: Text type configuration. - type: str - required: False - json: - description: JSON type configuration. - type: str - required: False - applicationConfigs: - description: Application specific configurations. - type: dict - required: False - contains: - configBlocks: List of ConfigBlocks for the application. - type: list - required: False - contains: - id: - description: ID of the ConfigBlock. Unique within an ApplicationConfig. - type: str - required: False - format: - description: Format of ConfigBlock. - type: str - required: False - content: - description: Contents of a ConfigBlock. - type: obj - required: False - contains: - keyValues: - description: Key-value type configurations. - type: obj - required: False - contains: - additionalProperties: - description: Key-value type configurations. - type: str - required: False - text: - description: Text type configuration. - type: str - required: False - json: - description: JSON type configuration. - type: str - required: False - ldapGroups: - description: LDAP Groupnames to be enabled for auth. + id: + description: ID of the ConfigBlock. Unique within an ApplicationConfig. + type: str + required: False + format: + description: Format of ConfigBlock. + type: str + required: False + content: + description: Contents of a ConfigBlock. + type: obj + required: False + contains: + keyValues: + description: Key-value type configurations. + type: obj + required: False + contains: + additionalProperties: + description: Key-value type configurations. + type: str + required: False + text: + description: Text type configuration. + type: str + required: False + json: + description: JSON type configuration. + type: str + required: False + application_configs: + description: Configurations that are applied to every application in the service. + type: dict + required: False + contains: + configBlocks: List of ConfigBlocks for the application. type: list - required: False - enableSSO: - description: Should SSO be enabled for this VW. - type: bool - required: False + required: False + contains: + id: + description: ID of the ConfigBlock. Unique within an ApplicationConfig. + type: str + required: False + format: + description: Format of ConfigBlock. + type: str + required: False + content: + description: Contents of a ConfigBlock. + type: obj + required: False + contains: + keyValues: + description: Key-value type configurations. + type: obj + required: False + contains: + additionalProperties: + description: Key-value type configurations. + type: str + required: False + text: + description: Text type configuration. + type: str + required: False + json: + description: JSON type configuration. + type: str + required: False + ldap_groups: + description: LDAP Groupnames to be enabled for auth. + type: list + required: False + enable_sso: + description: Should SSO be enabled for this VW. + type: bool + required: False tags: description: Tags associated with the resources. type: dict @@ -205,22 +200,20 @@ # Note: These examples do not set authentication details. # Create Virtual Warehouse -- cloudera.cloud.dw_vw: +- cloudera.cloud.dw_virtual_warehouse: cluster_id: "example-cluster-id" name: "example-virtual-warehouse" - vw_type: "hive" + type: "hive" template: "xsmall" - autoscaling: - min_cluster: 3 - max_cluster: 19 + autoscaling_min_nodes: 3 + autoscaling_max_nodes: 19 tags: tag-key: "tag-value" - configs: - enable_sso: true - ldap_groups: ['group1','group2','group3'] + enable_sso: true + ldap_groups: ['group1','group2','group3'] # Delete Virtual Warehouse -- cloudera.cloud.dw_vw: +- cloudera.cloud.dw_virtual_warehouse: cluster_id: "example-cluster-id" id: "example-virtual-warehouse-id" state: absent @@ -228,7 +221,7 @@ RETURN = r''' --- -vws: +virtual_warehouses: description: The information about the named CDW Virtual Warehouses. type: list returned: always @@ -302,11 +295,11 @@ def __init__(self, module): self.id = self._get_param('id') self.cluster_id = self._get_param('cluster_id') self.dbc_id = self._get_param('dbc_id') - self.vw_type = self._get_param('vw_type') + self.type = self._get_param('type') self.name = self._get_param('name') self.template = self._get_param('template') - self.autoscaling_min_cluster = self._get_param('autoscaling_min_cluster') - self.autoscaling_max_cluster = self._get_param('autoscaling_max_cluster') + self.autoscaling_min_nodes = self._get_param('autoscaling_min_nodes') + self.autoscaling_max_nodes = self._get_param('autoscaling_max_nodes') self.common_configs = self._get_param('common_configs') self.application_configs = self._get_param('application_configs') self.ldap_groups = self._get_param('ldap_groups') @@ -318,7 +311,7 @@ def __init__(self, module): self.timeout = self._get_param('timeout') # Initialize return values - self.vws = [] + self.virtual_warehouses = [] # Initialize internal values self.target = None @@ -339,7 +332,7 @@ def process(self): if self.target is not None: if self.state == 'absent': if self.module.check_mode: - self.vws.append(self.target) + self.virtual_warehouses.append(self.target) else: if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( @@ -354,9 +347,9 @@ def process(self): field=None, delay=self.delay, timeout=self.timeout ) else: - self.cdpy.sdk.sleep(3) # Wait for consistency sync + self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) - self.vws.append(self.target) + self.virtual_warehouses.append(self.target) # Drop Done elif self.state == 'present': # Begin Config check @@ -367,7 +360,7 @@ def process(self): params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) - self.vws.append(self.target) + self.virtual_warehouses.append(self.target) # End Config check else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) @@ -382,10 +375,10 @@ def process(self): pass else: vw_id = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, - dbc_id=self.dbc_id, vw_type=self.vw_type, name=self.name, + dbc_id=self.dbc_id, vw_type=self.type, name=self.name, template=self.template, - autoscaling_min_cluster=self.autoscaling_min_cluster, - autoscaling_max_cluster=self.autoscaling_max_cluster, + autoscaling_min_cluster=self.autoscaling_min_nodes, + autoscaling_max_cluster=self.autoscaling_max_nodes, common_configs=self.common_configs, application_configs=self.application_configs, ldap_groups=self.ldap_groups, enable_sso=self.enable_sso, @@ -398,7 +391,7 @@ def process(self): ) else: self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw_id) - self.vws.append(self.target) + self.virtual_warehouses.append(self.target) else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) @@ -409,11 +402,11 @@ def main(): id=dict(required=False, type='str', default=None), cluster_id=dict(required=True, type='str'), dbc_id=dict(required=False, type='str', default=None), - vw_type = dict(required=False, type='str', default=None), + type = dict(required=False, type='str', default=None), name = dict(required=False, type='str', default=None), template=dict(required=False, type='str', default=None), - autoscaling_min_cluster=dict(required=False, type='int', default=None), - autoscaling_max_cluster=dict(required=False, type='int', default=None), + autoscaling_min_nodes=dict(required=False, type='int', default=None), + autoscaling_max_nodes=dict(required=False, type='int', default=None), common_configs=dict(required=False, type='dict', default=None), application_configs=dict(required=False, type='dict', default=None), ldap_groups=dict(required=False, type='list', default=None), @@ -428,7 +421,7 @@ def main(): ) result = DwVw(module) - output = dict(changed=False, vws=result.vws) + output = dict(changed=False, virtual_warehouses=result.virtual_warehouses) if result.debug: output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) From babd10e05afb5c326bda4bd5aa198b14077c1286 Mon Sep 17 00:00:00 2001 From: Saravanan Raju Date: Thu, 16 Sep 2021 09:14:40 -0400 Subject: [PATCH 10/25] Expand common_config and application_config Signed-off-by: Saravanan Raju --- plugins/modules/dw_database_catalog.py | 21 +-- plugins/modules/dw_virtual_warehouse.py | 188 +++++++++++++++--------- 2 files changed, 134 insertions(+), 75 deletions(-) diff --git a/plugins/modules/dw_database_catalog.py b/plugins/modules/dw_database_catalog.py index bfecbe4e..8bee6c68 100644 --- a/plugins/modules/dw_database_catalog.py +++ b/plugins/modules/dw_database_catalog.py @@ -104,7 +104,7 @@ type: list returned: always elements: complex - contains: + suboptions: id: description: The id of the Database Catalog. returned: always @@ -148,6 +148,7 @@ def __init__(self, module): # Initialize internal values self.target = None + self.changed = False # Execute logic process self.process() @@ -172,6 +173,7 @@ def process(self): "DW Database Catalog not in valid state for Delete operation: %s" % self.target['status']) else: _ = self.cdpy.dw.delete_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) + self.changed = True if self.wait: self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, @@ -207,6 +209,7 @@ def process(self): else: dbc_id = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, load_demo_data=self.load_demo_data) + self.changed = True if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, @@ -223,20 +226,20 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(required=False, type='str', default=None), + id=dict(type='str'), cluster_id=dict(required=True, type='str'), - name = dict(required=False, type='str', default=None), - load_demo_data=dict(required=False, type='bool', default=False), - state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), - wait = dict(required=False, type='bool', default=True), - delay = dict(required=False, type='int', aliases=['polling_delay'], default=15), - timeout = dict(required=False, type='int', aliases=['polling_timeout'], default=3600) + name = dict(type='str'), + load_demo_data=dict(type='bool'), + state=dict(type='str', choices=['present', 'absent'], default='present'), + wait = dict(type='bool', default=True), + delay = dict(type='int', aliases=['polling_delay'], default=15), + timeout = dict(type='int', aliases=['polling_timeout'], default=3600) ), supports_check_mode=True ) result = DwDbc(module) - output = dict(changed=False, database_catalogs=result.database_catalogs) + output = dict(changed=result.changed, database_catalogs=result.database_catalogs) if result.debug: output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 9ba59041..88dbe812 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -72,11 +72,12 @@ description: Configurations that are applied to every application in the service. type: dict required: False - contains: + suboptions: configBlocks: List of ConfigBlocks for the application. type: list required: False - contains: + elements: dict + suboptions: id: description: ID of the ConfigBlock. Unique within an ApplicationConfig. type: str @@ -84,21 +85,16 @@ format: description: Format of ConfigBlock. type: str - required: False + required: False content: description: Contents of a ConfigBlock. - type: obj + type: dict required: False - contains: + suboptions: keyValues: description: Key-value type configurations. - type: obj + type: dict required: False - contains: - additionalProperties: - description: Key-value type configurations. - type: str - required: False text: description: Text type configuration. type: str @@ -111,45 +107,45 @@ description: Configurations that are applied to every application in the service. type: dict required: False - contains: - configBlocks: List of ConfigBlocks for the application. - type: list - required: False - contains: - id: - description: ID of the ConfigBlock. Unique within an ApplicationConfig. - type: str - required: False - format: - description: Format of ConfigBlock. - type: str - required: False - content: - description: Contents of a ConfigBlock. - type: obj - required: False - contains: - keyValues: - description: Key-value type configurations. - type: obj - required: False - contains: - additionalProperties: - description: Key-value type configurations. - type: str - required: False - text: - description: Text type configuration. - type: str - required: False - json: - description: JSON type configuration. - type: str - required: False + suboptions: + required: False + type: dict + suboptions: + configBlocks: List of ConfigBlocks for the application. + type: list + required: False + elements: dict + suboptions: + id: + description: ID of the ConfigBlock. Unique within an ApplicationConfig. + type: str + required: False + format: + description: Format of ConfigBlock. + type: str + required: False + content: + description: Contents of a ConfigBlock. + type: dict + required: False + suboptions: + keyValues: + description: Key-value type configurations. + type: dict + required: False + text: + description: Text type configuration. + type: str + required: False + json: + description: JSON type configuration. + type: str + required: False ldap_groups: description: LDAP Groupnames to be enabled for auth. type: list required: False + elements: str enable_sso: description: Should SSO be enabled for this VW. type: bool @@ -211,6 +207,41 @@ tag-key: "tag-value" enable_sso: true ldap_groups: ['group1','group2','group3'] + +- 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 Virtual Warehouse - cloudera.cloud.dw_virtual_warehouse: @@ -226,10 +257,10 @@ type: list returned: always elements: complex - contains: + suboptions: vws: type: dict - contains: + suboptions: id: description: Id of the Virtual Warehouse created. returned: always @@ -258,7 +289,7 @@ description: The CRN of the cluster creator. returned: always type: dict - contains: + suboptions: crn: type: str description: Actor CRN @@ -315,6 +346,7 @@ def __init__(self, module): # Initialize internal values self.target = None + self.changed = False # Execute logic process self.process() @@ -340,6 +372,7 @@ def process(self): 'status']) else: _ = self.cdpy.dw.delete_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) + self.changed = True if self.wait: self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, @@ -383,6 +416,7 @@ def process(self): application_configs=self.application_configs, ldap_groups=self.ldap_groups, enable_sso=self.enable_sso, tags=self.tags) + self.changed = True if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, @@ -399,29 +433,51 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(required=False, type='str', default=None), + id=dict(type='str'), cluster_id=dict(required=True, type='str'), - dbc_id=dict(required=False, type='str', default=None), - type = dict(required=False, type='str', default=None), - name = dict(required=False, type='str', default=None), - template=dict(required=False, type='str', default=None), - autoscaling_min_nodes=dict(required=False, type='int', default=None), - autoscaling_max_nodes=dict(required=False, type='int', default=None), - common_configs=dict(required=False, type='dict', default=None), - application_configs=dict(required=False, type='dict', default=None), - ldap_groups=dict(required=False, type='list', default=None), - enable_sso=dict(required=False, type='bool', default=False), - tags=dict(required=False, type='dict', default=None), - state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), - wait = dict(required=False, type='bool', default=True), - delay = dict(required=False, type='int', aliases=['polling_delay'], default=15), - timeout = dict(required=False, type='int', aliases=['polling_timeout'], default=3600) + dbc_id=dict(type='str'), + type = dict(type='str'), + name = dict(type='str'), + template=dict(type='str'), + autoscaling_min_nodes=dict(type='int'), + autoscaling_max_nodes=dict(type='int'), + common_configs=dict(type='dict', + options=dict( + configBlocks = dict( + type='list', + elements='dict', + options=dict( + dict( + id=dict(type='str'), + format=dict(type='str', choices=['HADOOP_XML', 'PROPERTIES', 'TEXT', 'JSON', 'BINARY', 'ENV', 'FLAGFILE']), + content=dict(type='dict', + options=dict( + dict( + keyValues=dict(type='dict'), + text=dict(type='str'), + json=dict(type='json') + ) + ) + ) + ) + ) + ) + ) + ), + application_configs=dict(type='dict'), + ldap_groups=dict(type='list'), + enable_sso=dict(type='bool'), + tags=dict(type='dict'), + state=dict(type='str', choices=['present', 'absent'], default='present'), + wait = dict(type='bool', default=True), + delay = dict(type='int', aliases=['polling_delay'], default=15), + timeout = dict(type='int', aliases=['polling_timeout'], default=3600) ), supports_check_mode=True ) result = DwVw(module) - output = dict(changed=False, virtual_warehouses=result.virtual_warehouses) + output = dict(changed=result.changed, virtual_warehouses=result.virtual_warehouses) if result.debug: output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) From 29b001423fc77feda2e9fe8d8dfe546e7013b00d Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:40 -0400 Subject: [PATCH 11/25] Update module documentation, return values, and logic flow Signed-off-by: Webster Mudge --- plugins/modules/dw_cluster.py | 238 +++++++++++++------------ plugins/modules/dw_database_catalog.py | 96 +++++----- 2 files changed, 175 insertions(+), 159 deletions(-) diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index a38fa10d..9826d774 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -30,53 +30,61 @@ - Create or Delete CDP Data Warehouse Clusters author: - "Dan Chaffelson (@chaffelson)" + - "Saravanan Raju (@raju-saravanan)" + - "Webster Mudge (@wmudge)" requirements: - cdpy options: - id: + name: description: - - If an ID is provided, that Data Warehouse Cluster will be deleted if C(state=absent) + - The identifier of the Data Warehouse Cluster. + - Required if C(state=absent) and C(env) is not specified. type: str - required: When state is absent aliases: - - name + - id env: - description: The name of the target environment + description: + - The name of the target environment. + - Required if C(state=present) or C(state=absent) and C(id) is not specified. type: str - required: when state is present aliases: - environment - env_crn overlay: - description: Set it to true to save IP addresses in the VPC by using a private IP address range for Pods in the cluster. + description: + - Flag to use private IP addresses for Pods within the cluster. + - Otherwise, use IP addresses within the VPC. type: bool - required: False default: False private_load_balancer: - description: Set up load balancer in private subnets. + description: Flag to set up a load balancer for private subnets. type: bool - required: False default: False aws_public_subnets: - description: List of zero or more Public AWS Subnet IDs to deploy to + description: + - List of zero or more Public AWS Subnet IDs used for deployment. + - Required if C(state=present) and the C(env) is deployed to AWS. type: list - required: when state is present for AWS deployment + elements: str aws_private_subnets: - description: List of zero or more Private AWS Subnet IDs to deploy to + description: + - List of zero or more Private AWS Subnet IDs used for deployment. + - Required if C(state=present) and the C(env) is deployed to AWS. type: list - required: when state is present for AWS deployment + elements: str az_subnet: - description: Azure Subnet Name, not URI + description: + - The Azure Subnet Name. + - Required if C(state=present) and the C(env) is deployed to Azure. type: str - required: when state is present for Azure deploymnet az_enable_az: - description: Whether to enable AZ mode or not + description: + - Flag to enable Availability Zone mode. + - Required if C(state=present) and the C(env) is deployed to Azure. type: bool - required: when state is present for Azure deployment state: - description: The declarative state of the Data Warehouse Cluster + description: The state of the Data Warehouse Cluster type: str - required: False default: present choices: - present @@ -86,14 +94,18 @@ - 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. type: bool - required: False default: True + force: + description: + - Flag to enable force deletion of the Data Warehouse Cluster. + - This will not destroy the underlying cloud provider assets. + type: bool + default: False delay: description: - The internal polling interval (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared state. type: int - required: False default: 15 aliases: - polling_delay @@ -102,7 +114,6 @@ - The internal polling timeout (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared state. type: int - required: False default: 3600 aliases: - polling_timeout @@ -114,11 +125,6 @@ EXAMPLES = r''' # Note: These examples do not set authentication details. -# Delete a Data Warehouse Cluster -- cloudera.cloud.dw_cluster: - state: absent - id: my-id - # Request Azure Cluster creation - cloudera.cloud.dw_cluster: env_crn: crn:cdp:environments... @@ -130,60 +136,65 @@ env_crn: crn:cdp:environments... aws_public_subnets: [subnet-id-1, subnet-id-2] aws_private_subnets: [subnet-id-3, subnet-id-4] + +# Delete a Data Warehouse Cluster +- cloudera.cloud.dw_cluster: + state: absent + id: my-id + +# Delete the Data Warehouse Cluster within the Environment +- cloudera.cloud.dw_cluster: + state: absent + env: crn:cdp:environments... ''' RETURN = r''' --- -clusters: - description: The information about the named Cluster or Clusters - type: list - returned: always - elements: complex +cluster: + description: Details for the Data Warehouse cluster + type: dict contains: - cluster: + name: + description: The name of the cluster. + returned: always + type: str + environmentCrn: + description: The crn of the cluster's environment. + returned: always + type: str + crn: + description: The cluster's CRN. + returned: always + type: str + creationDate: + description: The creation time of the cluster in UTC. + returned: always + type: str + status: + description: The status of the cluster. + returned: always + type: str + creator: + description: The details regarding the cluster creator. + returned: always type: dict contains: - name: - description: The name of the cluster. - returned: always - type: str - environmentCrn: - description: The crn of the cluster's environment. - returned: always - type: str crn: - description: The cluster's crn. - returned: always type: str - creationDate: - description: The creation time of the cluster in UTC. - returned: always + description: The creator's CRN + email: type: str - status: - description: The status of the Cluster - returned: always + description: Email address + workloadUsername: type: str - creator: - description: The CRN of the cluster creator. - returned: always - type: dict - contains: - crn: - type: str - description: Actor CRN - email: - type: str - description: Email address for users - workloadUsername: - type: str - description: Username for users - machineUsername: - type: str - description: Username for machine users - cloudPlatform: - description: The cloud platform of the environment that was used to create this cluster - returned: always + description: Username + machineUsername: type: str + description: Username for machine users + cloudPlatform: + description: The cloud platform of the environment housing the Data Warehouse cluster + returned: always + type: str sdk_out: description: Returns the captured CDP SDK log. returned: when supported @@ -216,7 +227,8 @@ def __init__(self, module): self.timeout = self._get_param('timeout') # Initialize return values - self.clusters = [] + self.cluster = {} + self.changed = False # Initialize internal values self.target = None @@ -227,6 +239,7 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): env_crn = self.cdpy.environments.resolve_environment_crn(self.env) + # Check if Cluster exists if self.name is not None: self.target = self.cdpy.dw.describe_cluster(cluster_id=self.name) @@ -238,22 +251,23 @@ def process(self): elif len(listing) == 0: self.target = None else: - self.module.fail_json( - msg="Got ambiguous listing result for DW Clusters in Environment %s" % self.env) + self.module.fail_json(msg="Received multiple (i.e. ambiguious) DW Clusters in Environment %s" % self.env) else: self.target = None + if self.target is not None: - # Cluster Exists + # Begin Cluster Exists if self.state == 'absent': # Begin Delete if self.module.check_mode: - self.clusters.append(self.target) + self.cluster = self.target else: + self.changed = True if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: - self.module.warn( - "DW Cluster not in valid state for Delete operation: %s" % self.target['status']) + self.module.warn("DW Cluster is not in a valid state for Delete operations: %s" % self.target['status']) else: _ = self.cdpy.dw.delete_cluster(cluster_id=self.name, force=self.force) + if self.wait: self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_cluster, @@ -261,33 +275,31 @@ def process(self): field=None, delay=self.delay, timeout=self.timeout ) else: - self.cdpy.sdk.sleep(3) # Wait for consistency sync - self.target = self.cdpy.dw.describe_cluster(cluster_id=self.name) - self.clusters.append(self.target) - # Drop Done + self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync + self.cluster = self.cdpy.dw.describe_cluster(cluster_id=self.name) + # End Delete elif self.state == 'present': - # Being Config check - self.module.warn("DW Cluster already present and config validation is not implemented") + # Begin Config Check + self.module.warn("DW Cluster is already present and reconciliation is not yet implemented") if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_cluster, params=dict(cluster_id=self.name), state='Running', delay=self.delay, timeout=self.timeout ) - self.clusters.append(self.target) - # End Config check + self.cluster = self.target + # End Config Check else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) - # End handling Cluster exists + # End Cluster Exists else: - # Begin handling Cluster not found + # Begin Cluster Not Found if self.state == 'absent': - self.module.warn("DW CLuster %s already absent in Environment %s" % (self.name, self.env)) + self.module.warn("DW Cluster %s already absent in Environment %s" % (self.name, self.env)) elif self.state == 'present': - if self.module.check_mode: - pass - else: - # Being handle Cluster Creation + if not self.module.check_mode: + # Begin Cluster Creation + self.changed = True if env_crn is None: self.module.fail_json(msg="Could not retrieve CRN for CDP Environment %s" % self.env) else: @@ -297,45 +309,49 @@ def process(self): az_subnet=self.az_subnet, az_enable_az=self.az_enable_az ) if self.wait: - self.target = self.cdpy.sdk.wait_for_state( + self.cluster = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_cluster, params=dict(cluster_id=self.name), state='Running', delay=self.delay, timeout=self.timeout ) else: - self.target = self.cdpy.dw.describe_cluster(cluster_id=self.name) - self.clusters.append(self.target) + self.cluster = self.cdpy.dw.describe_cluster(cluster_id=self.name) + # End Cluster Creation else: - self.module.fail_json(msg="State %s is not valid for this module" % self.state) + self.module.fail_json(msg="Invalid state: %s" % self.state) + # End Cluster Not Found def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=False, type='str', aliases=['id']), - env=dict(required=False, type='str', aliases=['environment', 'env_crn']), - overlay=dict(required=False, type='bool', default=False), - private_load_balancer=dict(required=False, type='bool', default=False), - az_subnet=dict(required=False, type='str', default=None), - az_enable_az=dict(required=False, type='bool', default=None), - aws_public_subnets=dict(required=False, type='list', default=None), - aws_private_subnets=dict(required=False, type='list', default=None), - state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), - force=dict(required=False, type='bool', default=False), - wait=dict(required=False, type='bool', default=True), - delay=dict(required=False, type='int', aliases=['polling_delay'], default=15), - timeout=dict(required=False, type='int', aliases=['polling_timeout'], default=3600) + name=dict(type='str', aliases=['id']), + env=dict(type='str', aliases=['environment', 'env_crn']), + overlay=dict(type='bool', default=False), + private_load_balancer=dict(type='bool', default=False), + az_subnet=dict(type='str', default=None), + az_enable_az=dict(type='bool', default=None), + aws_public_subnets=dict(type='list', default=None), + aws_private_subnets=dict(type='list', default=None), + state=dict(type='str', choices=['present', 'absent'], default='present'), + force=dict(type='bool', default=False), + wait=dict(type='bool', default=True), + delay=dict(type='int', aliases=['polling_delay'], default=15), + timeout=dict(type='int', aliases=['polling_timeout'], default=3600) ), required_together=[ ['az_subnet', 'az_enable_az'], ['aws_public_subnets', 'aws_private_subnets'] ], - required_one_of=[['name', 'env'], ], + required_if=[ + ['state', 'absent', ['name', 'env']], + ['state', 'present', ['env']] + ], supports_check_mode=True ) result = DwCluster(module) - output = dict(changed=False, clusters=result.clusters) + output = dict(changed=result.changed, cluster=result.cluster) if result.debug: output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) diff --git a/plugins/modules/dw_database_catalog.py b/plugins/modules/dw_database_catalog.py index 8bee6c68..af74564b 100644 --- a/plugins/modules/dw_database_catalog.py +++ b/plugins/modules/dw_database_catalog.py @@ -25,9 +25,9 @@ DOCUMENTATION = r''' --- module: dw_database_catalog -short_description: Create CDP Data Warehouse Database Catalog +short_description: Create, manage, and destroy CDP Data Warehouse Database Catalogs description: - - Create CDP Database Catalog + - Create, manage, and destroy CDP Data Warehouse Database Catalogs author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" @@ -37,34 +37,34 @@ options: id: description: - - If an ID is provided, that Database Catalog will be deleted if C(state=absent) + - The identifier of the Database Catalog. + - Required if C(state=absent). type: str - required: When state is absent cluster_id: - description: ID of cluster where Database Catalog should be created. + description: + - The identifier of the parent DW Cluster of the Database Catalog. type: str required: True name: - description: Name of the Database Catalog. + description: + - The name of the Database Catalog. + - Required if C(state=present). type: str - required: True load_demo_data: - description: Set this to true if you demo data should be loaded into the Database Catalog. + description: + - Flag to load demonstration data into the Database Catalog during creation. type: str - required: False wait: description: - 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. type: bool - required: False default: True delay: description: - The internal polling interval (in seconds) while the module waits for the Data Catalog to achieve the declared state. type: int - required: False default: 15 aliases: - polling_delay @@ -73,7 +73,6 @@ - The internal polling timeout (in seconds) while the module waits for the Data Catalog to achieve the declared state. type: int - required: False default: 3600 aliases: - polling_timeout @@ -87,26 +86,25 @@ # Create Database Catalog - cloudera.cloud.dw_database_catalog: - name: "example-database-catalog-name" - cluster_id: "example-cluster-id" + name: example-database-catalog-name + cluster_id: example-cluster-id # Delete Database Catalog - cloudera.cloud.dw_database_catalog: - id: "example-database-id" - cluster_id: "example-cluster-id" - state: "absent" + id: example-database-id + cluster_id: example-cluster-id + state: absent ''' RETURN = r''' --- -database_catalogs: - description: The information about the named Database Catalog. - type: list +database_catalog: + description: Details about the Database Catalog. returned: always - elements: complex - suboptions: + type: dict + contains: id: - description: The id of the Database Catalog. + description: The identifier of the Database Catalog. returned: always type: str name: @@ -144,11 +142,11 @@ def __init__(self, module): self.timeout = self._get_param('timeout') # Initialize return values - self.database_catalogs = [] + self.database_catalog = {} + self.changed = False # Initialize internal values self.target = None - self.changed = False # Execute logic process self.process() @@ -160,17 +158,19 @@ def process(self): for dbc in dbcs: if self.name is not None and dbc['name'] == self.name: self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc['id']) - elif self.id is not None and dbc['id'] == self.id: - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.id) - # If Database Catalog exists + else: + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.id) + if self.target is not None: + # Begin Database Catalog Exists if self.state == 'absent': if self.module.check_mode: - self.database_catalogs.append(self.target) + self.database_catalog = self.target else: + # Begin Drop if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( - "DW Database Catalog not in valid state for Delete operation: %s" % self.target['status']) + "DW Database Catalog is not in a valid state for Delete operations: %s" % self.target['status']) else: _ = self.cdpy.dw.delete_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) self.changed = True @@ -182,46 +182,42 @@ def process(self): ) else: self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) - self.database_catalogs.append(self.target) - # Drop Done + self.database_catalog = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) + # End Drop elif self.state == 'present': - # Begin Config check - self.module.warn("DW Database Catalog already present and config validation is not implemented") + # Begin Config Check + self.module.warn("DW Database Catalog already present and reconciliation is not yet implemented") if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, params=dict(cluster_id=self.cluster_id, dbc_id=self.target['id']), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) - self.database_catalogs.append(self.target) - # End Config check + self.database_catalog = self.target + # End Config Check else: - self.module.fail_json(msg="State %s is not valid for this module" % self.state) - # End handling Database Catalog exists + self.module.fail_json(msg="Invalid state %s" % self.state) + # End Database Catalog Exists else: - # Begin handling Database Catalog not found + # Begin Database Catalog Not Found if self.state == 'absent': self.module.warn("DW Database Catalog %s already absent in Cluster %s" % (self.name, self.cluster_id)) elif self.state == 'present': - if self.module.check_mode: - pass - else: + if not self.module.check_mode: dbc_id = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, load_demo_data=self.load_demo_data) self.changed = True if self.wait: - self.target = self.cdpy.sdk.wait_for_state( + self.database_catalog = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, params=dict(cluster_id=self.cluster_id, dbc_id=dbc_id), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) else: - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc_id) - self.database_catalogs.append(self.target) + self.database_catalog = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc_id) else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) - + # End Database Catalog Not Found def main(): module = AnsibleModule( @@ -235,11 +231,15 @@ def main(): delay = dict(type='int', aliases=['polling_delay'], default=15), timeout = dict(type='int', aliases=['polling_timeout'], default=3600) ), + required_if=[ + ['state', 'present', ['name']], + ['state', 'absent', ['name', 'id']], + ], supports_check_mode=True ) result = DwDbc(module) - output = dict(changed=result.changed, database_catalogs=result.database_catalogs) + output = dict(changed=result.changed, database_catalog=result.database_catalog) if result.debug: output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) From 81e84245388c8407f1951b521c3fd8c628702971 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:41 -0400 Subject: [PATCH 12/25] WIP of documentation updates, return values and logic flow Signed-off-by: Webster Mudge --- plugins/modules/dw_virtual_warehouse.py | 289 +++++++++++------------- 1 file changed, 134 insertions(+), 155 deletions(-) diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 88dbe812..8b108ad4 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -25,7 +25,7 @@ DOCUMENTATION = r''' --- module: dw_virtual_warehouse -short_description: Create CDP Data Warehouse Virtual Warehouse +short_description: Create, manage, and destroy CDP Data Warehouse Virtual Warehouses description: - Create CDP Virtual Warehouse author: @@ -37,153 +37,146 @@ options: id: description: - - If an ID is provided, that Virtual Warehouse will be deleted if C(state=absent) + - The identifier of the Virtual Warehouse. + - Required if C(state=absent). type: str - required: When state is absent cluster_id: - description: ID of cluster where Virtual Warehouse should be created. + description: + - The identifier of the parent DW Cluster of the Virtual Warehouse. type: str required: True dbc_id: - description: ID of Database Catalog that the Virtual Warehouse should be attached to. + description: + - The identifier of the parent Database Catalog attached to the Virtual Warehouse. type: str required: True type: - description: Type of Virtual Warehouse to be created. + description: + - The type of Virtual Warehouse to be created. + - Required if C(state=present) type: str - required: True + choices: + - hive + - impala name: - description: Name of the Virtual Warehouse. + description: + - The name of the Virtual Warehouse. + - Required if C(state=present) type: str - required: True template: - description: Name of configuration template to use. + description: The name of deployment template for the Virtual Warehouse type: str - required: False + choices: + - xsmall + - small + - medium + - large autoscaling_min_nodes: - description: Minimum number of available nodes for Virtual Warehouse autoscaling. + description: The minimum number of available nodes for Virtual Warehouse autoscaling. type: int - required: False autoscaling_max_nodes: - description: Maximum number of available nodes for Virtual Warehouse autoscaling. + description: The maximum number of available nodes for Virtual Warehouse autoscaling. type: int - required: False common_configs: - description: Configurations that are applied to every application in the service. + description: Configurations that are applied to every application in the Virtual Warehouse service. type: dict - required: False suboptions: - configBlocks: List of ConfigBlocks for the application. + configBlocks: List of I(ConfigBlocks) for the application. type: list - required: False elements: dict suboptions: id: - description: ID of the ConfigBlock. Unique within an ApplicationConfig. + description: + - ID of the ConfigBlock. + - Unique within an I(ApplicationConfig). type: str - required: False format: - description: Format of ConfigBlock. + description: Format of the ConfigBlock. type: str - required: False content: - description: Contents of a ConfigBlock. + description: Contents of the ConfigBlock. type: dict - required: False suboptions: keyValues: - description: Key-value type configurations. + description: Key-value type configuration. type: dict - required: False text: description: Text type configuration. type: str - required: False json: description: JSON type configuration. type: str - required: False application_configs: - description: Configurations that are applied to every application in the service. + description: Configurations that are applied to specific applications in the Virtual Warehouse service. type: dict - required: False suboptions: - required: False - type: dict - suboptions: - configBlocks: List of ConfigBlocks for the application. - type: list - required: False - elements: dict - suboptions: - id: - description: ID of the ConfigBlock. Unique within an ApplicationConfig. - type: str - required: False - format: - description: Format of ConfigBlock. - type: str - required: False - content: - description: Contents of a ConfigBlock. - type: dict - required: False - suboptions: - keyValues: - description: Key-value type configurations. - type: dict - required: False - text: - description: Text type configuration. - type: str - required: False - json: - description: JSON type configuration. - type: str - required: False + __application_name__: + description: The application name or identifier. + type: dict + suboptions: + configBlocks: List of ConfigBlocks for the application. + type: list + required: False + elements: dict + suboptions: + id: + description: + - ID of the ConfigBlock. + - Unique within an ApplicationConfig. + type: str + format: + description: Format of ConfigBlock. + type: str + content: + description: Contents of a ConfigBlock. + type: dict + suboptions: + keyValues: + description: Key-value type configuration. + type: dict + text: + description: Text type configuration. + type: str + json: + description: JSON type configuration. + type: str ldap_groups: - description: LDAP Groupnames to be enabled for auth. + description: LDAP Groupnames to enabled for authentication to the Virtual Warehouse. type: list - required: False elements: str enable_sso: - description: Should SSO be enabled for this VW. + description: Flag to enable SSO for the Virtual Warehouse. type: bool - required: False + default: False tags: - description: Tags associated with the resources. + description: Key-value tags associated with the Virtual Warehouse cloud provider resources. type: dict - required: False state: description: The declarative state of the Virtual Warehouse type: str - required: False default: present choices: - present - absent wait: description: - - Flag to enable internal polling to wait for the Data Warehouse Cluster to achieve the declared state. + - 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. type: bool - required: False default: True delay: description: - - The internal polling interval (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared + - The internal polling interval (in seconds) while the module waits for the Virtual Warehouse to achieve the declared state. type: int - required: False default: 15 aliases: - polling_delay timeout: description: - - The internal polling timeout (in seconds) while the module waits for the Data Warehouse Cluster to achieve the declared + - The internal polling timeout (in seconds) while the module waits for the Virtual Warehouse to achieve the declared state. type: int - required: False default: 3600 aliases: - polling_timeout @@ -197,10 +190,10 @@ # Create Virtual Warehouse - cloudera.cloud.dw_virtual_warehouse: - cluster_id: "example-cluster-id" - name: "example-virtual-warehouse" - type: "hive" - template: "xsmall" + cluster_id: example-cluster-id + name: example-virtual-warehouse + type: hive + template: xsmall autoscaling_min_nodes: 3 autoscaling_max_nodes: 19 tags: @@ -215,34 +208,21 @@ 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" - } - } - ] - } - }" - - + 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 Virtual Warehouse - cloudera.cloud.dw_virtual_warehouse: cluster_id: "example-cluster-id" @@ -252,60 +232,59 @@ RETURN = r''' --- -virtual_warehouses: - description: The information about the named CDW Virtual Warehouses. - type: list - returned: always - elements: complex +virtual_warehouse: + description: The details about the CDP Data Warehouse Virtual Warehouse. + type: dict suboptions: - vws: + id: + description: The identifier of the Virtual Warehouse. + returned: always + type: str + name: + description: The name of the Virtual Warehouse. + returned: always + type: str + vwType: + description: The Virtual Warehouse type. + returned: always + type: str + dbcId: + description: The Database Catalog ID associated with the Virtual Warehouse. + returned: always + type: str + creationDate: + description: The creation time of the Virtual Warehouse in UTC. + returned: always + type: str + status: + description: The status of the Virtual Warehouse. + returned: always + type: str + creator: + description: The CRN of the Virtual Warehouse creator. + returned: always type: dict suboptions: - id: - description: Id of the Virtual Warehouse created. - returned: always + crn: type: str - name: - description: Name of the Virtual Warehouse created. + description: The creator's Actor CRN returned: always + email: type: str - vwType: - description: Virtual Warehouse type. - returned: always + description: Email address (for users) + returned: when supported + workloadUsername: type: str - dbcId: - description: Database Catalog ID against which Virtual Warehouse was created. - returned: always - type: str - creationDate: - description: The creation time of the cluster in UTC. - returned: always + description: Username (for users) + returned: when supported + machineUsername: type: str - status: - description: The status of the Virtual Warehouse. - returned: always - type: str - creator: - description: The CRN of the cluster creator. - returned: always - type: dict - suboptions: - crn: - type: str - description: Actor CRN - email: - type: str - description: Email address for users - workloadUsername: - type: str - description: Username for users - machineUsername: - type: str - description: Username for machine users - tags: - description: Custom tags that were used to create this Virtual Warehouse. - returned: always - type: dict + description: Username (for machine users) + returned: when supported + tags: + description: Custom tags applied to the Virtual Warehouse. + returned: always + type: dict sdk_out: description: Returns the captured CDP SDK log. returned: when supported From 1a4409ea9fcb1e2cd56676050537a96c42b8fae4 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:41 -0400 Subject: [PATCH 13/25] Add modules to documentation Signed-off-by: Webster Mudge --- docsrc/index.rst | 2 ++ plugins/README.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docsrc/index.rst b/docsrc/index.rst index cdac0aee..054e0938 100644 --- a/docsrc/index.rst +++ b/docsrc/index.rst @@ -19,6 +19,8 @@ cloudera.cloud Ansible Collection df_info dw_cluster dw_cluster_info + dw_database_catalog + dw_virtual_warehouse env env_auth env_auth_info diff --git a/plugins/README.md b/plugins/README.md index 56867418..d8da4552 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -20,6 +20,8 @@ modules employ the underlying SDK contained within the `cdpy` Python package. | [df_info](./modules/df_info.py) | Gather information about CDP DataFlow services | | [dw_cluster](./modules/dw_cluster.py) | Create, manage, and destroy CDP Data Warehouse experiences | | [dw_cluster_info](./modules/dw_cluster_info.py) | Gather information about CDP Data Warehouse experiences | +| [dw_database_catalog](./modules/dw_database_catalog.py) | Create, manage, and destroy CDP Data Warehouse Data Catalogs | +| [dw_virtual_warehouse](./modules/dw_virtual_warehouse.py) | Create, manage, and destroy CDP Data Warehouse Virtual Warehouses | | [env](./modules/env.py) | Create, manage, and destroy CDP Environments | | [env_auth](./modules/env_auth.py) | Set authentication details for CDP Environments | | [env_auth_info](./modules/env_auth_info.py) | Gather information about CDP Environment authentication details | From 5c19a601b456d34d17eb581d5c24cc520cd2f121 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:41 -0400 Subject: [PATCH 14/25] Add missing descriptions to ConfigBlocks Signed-off-by: Webster Mudge --- plugins/modules/dw_virtual_warehouse.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 8b108ad4..e9143189 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -81,7 +81,8 @@ description: Configurations that are applied to every application in the Virtual Warehouse service. type: dict suboptions: - configBlocks: List of I(ConfigBlocks) for the application. + configBlocks: + description: List of I(ConfigBlocks) for the application. type: list elements: dict suboptions: @@ -114,7 +115,8 @@ description: The application name or identifier. type: dict suboptions: - configBlocks: List of ConfigBlocks for the application. + configBlocks: + description: List of I(ConfigBlocks) for the specified application. type: list required: False elements: dict From 3fdcfd89c10bf7279f8374667e7419a51f7f3b84 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:41 -0400 Subject: [PATCH 15/25] Tweak fail message Signed-off-by: Webster Mudge --- plugins/modules/dw_cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index 9826d774..384054d2 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -251,7 +251,7 @@ def process(self): elif len(listing) == 0: self.target = None else: - self.module.fail_json(msg="Received multiple (i.e. ambiguious) DW Clusters in Environment %s" % self.env) + self.module.fail_json(msg="Received multiple (i.e. ambiguous) DW Clusters in Environment %s" % self.env) else: self.target = None From 1df347f9f6ab98580149f170286c583c3771ed94 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:41 -0400 Subject: [PATCH 16/25] Update module spec, API doc, and adjust logic flow for singular return value Signed-off-by: Webster Mudge --- plugins/modules/dw_virtual_warehouse.py | 116 ++++++++++++------------ 1 file changed, 57 insertions(+), 59 deletions(-) diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index e9143189..e049c219 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -42,14 +42,14 @@ type: str cluster_id: description: - - The identifier of the parent DW Cluster of the Virtual Warehouse. + - The identifier of the parent Data Warehouse Cluster of the Virtual Warehouse. type: str required: True dbc_id: description: - The identifier of the parent Database Catalog attached to the Virtual Warehouse. + - Required if C(state=present) type: str - required: True type: description: - The type of Virtual Warehouse to be created. @@ -94,6 +94,14 @@ format: description: Format of the ConfigBlock. type: str + choices: + - HADOOP_XML + - PROPERTIES + - TEXT + - JSON + - BINARY + - ENV + - FLAGFILE content: description: Contents of the ConfigBlock. type: dict @@ -147,7 +155,7 @@ type: list elements: str enable_sso: - description: Flag to enable SSO for the Virtual Warehouse. + description: Flag to enable Single Sign-On (SSO) for the Virtual Warehouse. type: bool default: False tags: @@ -190,7 +198,7 @@ EXAMPLES = r''' # Note: These examples do not set authentication details. -# Create Virtual Warehouse +# Create a Virtual Warehouse - cloudera.cloud.dw_virtual_warehouse: cluster_id: example-cluster-id name: example-virtual-warehouse @@ -199,13 +207,14 @@ autoscaling_min_nodes: 3 autoscaling_max_nodes: 19 tags: - tag-key: "tag-value" + some_key: "some value" enable_sso: true - ldap_groups: ['group1','group2','group3'] - + 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" + cluster_id: example-cluster-id + name: example-virtual-warehouse type: "hive" template: "xsmall" enable_sso: true @@ -225,10 +234,10 @@ content: text: "\n[libdefaults]\n\trenew_lifetime = 7d" -# Delete Virtual Warehouse +# Delete a Virtual Warehouse - cloudera.cloud.dw_virtual_warehouse: - cluster_id: "example-cluster-id" - id: "example-virtual-warehouse-id" + cluster_id: example-cluster-id + id: example-virtual-warehouse-id state: absent ''' @@ -323,7 +332,7 @@ def __init__(self, module): self.timeout = self._get_param('timeout') # Initialize return values - self.virtual_warehouses = [] + self.virtual_warehouse = {} # Initialize internal values self.target = None @@ -339,18 +348,19 @@ def process(self): for vw in vws: if self.name is not None and vw['name'] == self.name: self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw['id']) - elif self.id is not None and vw['id'] == self.id: - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.id) - # If Virtual Warehouse exists + else: + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.id) + if self.target is not None: + # Begin Virtual Warehouse Exists if self.state == 'absent': if self.module.check_mode: - self.virtual_warehouses.append(self.target) + self.virtual_warehouse = self.target else: + # Begin Drop if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( - "DW Virtual Warehouse not in valid state for Delete operation: %s" % self.target[ - 'status']) + "DW Virtual Warehouse not in valid state for Delete operation: %s" % self.target['status']) else: _ = self.cdpy.dw.delete_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) self.changed = True @@ -362,32 +372,29 @@ def process(self): ) else: self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) - self.virtual_warehouses.append(self.target) - # Drop Done + self.virtual_warehouse = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) + # End Drop elif self.state == 'present': # Begin Config check - self.module.warn("DW Virtual Warehouse already present and config validation is not implemented") + self.module.warn("DW Virtual Warehouse already present and reconciliation is not implemented") if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) - self.virtual_warehouses.append(self.target) - # End Config check + self.virtual_warehouse = self.target + # End Config check else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) - # End handling Virtual Warehouse exists + # End Virtual Warehouse Exists else: - # Begin handling Virtual Warehouse not found + # Begin Virtual Warehouse Not Found if self.state == 'absent': self.module.warn( "DW Virtual Warehouse %s already absent in Cluster %s" % (self.name, self.cluster_id)) elif self.state == 'present': - if self.module.check_mode: - pass - else: + if not self.module.check_mode: vw_id = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, dbc_id=self.dbc_id, vw_type=self.type, name=self.name, template=self.template, @@ -399,17 +406,16 @@ def process(self): tags=self.tags) self.changed = True if self.wait: - self.target = self.cdpy.sdk.wait_for_state( + self.virtual_warehouse = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, params=dict(cluster_id=self.cluster_id, vw_id=vw_id), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout ) else: - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw_id) - self.virtual_warehouses.append(self.target) + self.virtual_warehouse = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw_id) else: self.module.fail_json(msg="State %s is not valid for this module" % self.state) - + # End Virtual Warehouse Not Found def main(): module = AnsibleModule( @@ -419,32 +425,20 @@ def main(): dbc_id=dict(type='str'), type = dict(type='str'), name = dict(type='str'), - template=dict(type='str'), + template=dict(type='str', choices=['xsmall', 'small', 'medium', 'large']), autoscaling_min_nodes=dict(type='int'), autoscaling_max_nodes=dict(type='int'), - common_configs=dict(type='dict', - options=dict( - configBlocks = dict( - type='list', - elements='dict', - options=dict( - dict( - id=dict(type='str'), - format=dict(type='str', choices=['HADOOP_XML', 'PROPERTIES', 'TEXT', 'JSON', 'BINARY', 'ENV', 'FLAGFILE']), - content=dict(type='dict', - options=dict( - dict( - keyValues=dict(type='dict'), - text=dict(type='str'), - json=dict(type='json') - ) - ) - ) - ) - ) - ) - ) - ), + common_configs=dict(type='dict', options=dict( + configBlocks = dict(type='list', elements='dict', options=dict( + id=dict(type='str'), + format=dict(type='str', choices=['HADOOP_XML', 'PROPERTIES', 'TEXT', 'JSON', 'BINARY', 'ENV', 'FLAGFILE']), + content=dict(type='dict', options=dict( + keyValues=dict(type='dict'), + text=dict(type='str'), + json=dict(type='json') + )) + )) + )), application_configs=dict(type='dict'), ldap_groups=dict(type='list'), enable_sso=dict(type='bool'), @@ -454,11 +448,15 @@ def main(): delay = dict(type='int', aliases=['polling_delay'], default=15), timeout = dict(type='int', aliases=['polling_timeout'], default=3600) ), + required_if=[ + ['state', 'absent', ['id']], + ['state', 'present', ['dbc_id', 'type', 'name'], True] + ], supports_check_mode=True ) result = DwVw(module) - output = dict(changed=result.changed, virtual_warehouses=result.virtual_warehouses) + output = dict(changed=result.changed, virtual_warehouse=result.virtual_warehouse) if result.debug: output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) From f2de47f3b817efce174f284165c73d85d2dea6d6 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:42 -0400 Subject: [PATCH 17/25] Add dw_database_catalog_info module Signed-off-by: Webster Mudge --- docsrc/index.rst | 1 + plugins/README.md | 1 + plugins/modules/dw_database_catalog_info.py | 157 ++++++++++++++++++++ 3 files changed, 159 insertions(+) create mode 100644 plugins/modules/dw_database_catalog_info.py diff --git a/docsrc/index.rst b/docsrc/index.rst index 054e0938..6c4b2458 100644 --- a/docsrc/index.rst +++ b/docsrc/index.rst @@ -20,6 +20,7 @@ cloudera.cloud Ansible Collection dw_cluster dw_cluster_info dw_database_catalog + dw_database_catalog_info dw_virtual_warehouse env env_auth diff --git a/plugins/README.md b/plugins/README.md index d8da4552..a1243141 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -21,6 +21,7 @@ modules employ the underlying SDK contained within the `cdpy` Python package. | [dw_cluster](./modules/dw_cluster.py) | Create, manage, and destroy CDP Data Warehouse experiences | | [dw_cluster_info](./modules/dw_cluster_info.py) | Gather information about CDP Data Warehouse experiences | | [dw_database_catalog](./modules/dw_database_catalog.py) | Create, manage, and destroy CDP Data Warehouse Data Catalogs | +| [dw_database_catalog_info](./modules/dw_database_catalog_info.py) | Gather information about CDP Data Warehouse Data Catalogs | | [dw_virtual_warehouse](./modules/dw_virtual_warehouse.py) | Create, manage, and destroy CDP Data Warehouse Virtual Warehouses | | [env](./modules/env.py) | Create, manage, and destroy CDP Environments | | [env_auth](./modules/env_auth.py) | Set authentication details for CDP Environments | diff --git a/plugins/modules/dw_database_catalog_info.py b/plugins/modules/dw_database_catalog_info.py new file mode 100644 index 00000000..b8deed1a --- /dev/null +++ b/plugins/modules/dw_database_catalog_info.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2021 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.cloudera.cloud.plugins.module_utils.cdp_common import CdpModule + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + +DOCUMENTATION = r''' +--- +module: dw_database_catalog_info +short_description: Gather information about CDP Data Warehouse Database Catalogs +description: + - Gather information about CDP Data Warehouse Database Catalogs +author: + - "Webster Mudge (@wmudge)" + - "Dan Chaffelson (@chaffelson)" + - "Saravanan Raju (@raju-saravanan)" +requirements: + - cdpy +options: + id: + description: + - The identifier of the Database Catalog. + - If undefined, will return a list of all Database Catalogs in the Cluster. + - Exclusive with I(name). + type: str + cluster_id: + description: + - The identifier of the parent Cluster of the Database Catalog or Catalogs. + type: str + required: True + name: + description: + - The name of the Database Catalog. + - If undefined, will return a list of all Database Catalogs in the Cluster. + - Exclusive with I(id). + type: str +extends_documentation_fragment: + - cloudera.cloud.cdp_sdk_options + - cloudera.cloud.cdp_auth_options +''' + +EXAMPLES = r''' +# Note: These examples do not set authentication details. + +# Get a single Database Catalog +- cloudera.cloud.dw_database_catalog_info: + name: example-database-catalog-name + cluster_id: example-cluster-id + +# Get all Database Catalogs within a Cluster +- cloudera.cloud.dw_database_catalog_info: + cluster_id: example-cluster-id +''' + +RETURN = r''' +--- +database_catalogs: + description: Details about the Database Catalogs. + returned: always + type: list + elements: dict + contains: + id: + description: The identifier of the Database Catalog. + returned: always + type: str + name: + description: The name of the Database Catalog. + returned: always + type: str + status: + description: The status of the Database Catalog. + returned: always + type: str +sdk_out: + description: Returns the captured CDP SDK log. + returned: when supported + type: str +sdk_out_lines: + description: Returns a list of each line of the captured CDP SDK log. + returned: when supported + type: list + elements: str +''' + + +class DwDbcInfo(CdpModule): + def __init__(self, module): + super(DwDbcInfo, self).__init__(module) + + # Set variables + self.id = self._get_param('id') + self.cluster_id = self._get_param('cluster_id') + self.name = self._get_param('name') + + # Initialize return values + self.database_catalogs = [] + + # Execute logic process + self.process() + + @CdpModule._Decorators.process_debug + def process(self): + if self.id is not None: + target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.id) + if target is not None: + self.database_catalogs.append(target) + else: + dbcs = self.cdpy.dw.list_dbcs(cluster_id=self.cluster_id) + if self.name is not None: + for dbc in dbcs: + if dbc['name'] == self.name: + self.database_catalogs.append(self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc['id'])) + else: + self.database_catalogs = dbcs + + +def main(): + module = AnsibleModule( + argument_spec=CdpModule.argument_spec( + id=dict(type='str'), + cluster_id=dict(required=True, type='str'), + name = dict(type='str'), + ), + mutually_exclusive=[['id', 'name']], + supports_check_mode=True + ) + + result = DwDbcInfo(module) + output = dict(changed=False, database_catalogs=result.database_catalogs) + + if result.debug: + output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) + + module.exit_json(**output) + + +if __name__ == '__main__': + main() From c29f82e1da06a205d1bf88e0e71e274f87777c1d Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:42 -0400 Subject: [PATCH 18/25] Fix debug log bug Issue violations as discrete array in returned error Add check for verbosity or debug to SDK warnings handler Signed-off-by: Webster Mudge --- plugins/module_utils/cdp_common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/cdp_common.py b/plugins/module_utils/cdp_common.py index 18e1205d..b1d43a2a 100644 --- a/plugins/module_utils/cdp_common.py +++ b/plugins/module_utils/cdp_common.py @@ -41,7 +41,7 @@ def process_debug(cls, f): def _impl(self, *args, **kwargs): result = f(self, *args, **kwargs) if self.debug: - self.log_out = self.cdpy.get_log() + self.log_out = self.cdpy.sdk.get_log() self.log_lines.append(self.log_out.splitlines()) return result @@ -73,11 +73,12 @@ def _get_param(self, param, default=None): def _cdp_module_throw_error(self, error: 'CdpError'): """Error handler for CDPy SDK""" - self.module.fail_json(msg=str(error.message), error=str(error.__dict__)) + self.module.fail_json(msg=str(error.message), error=str(error.__dict__), violations=error.violations) def _cdp_module_throw_warning(self, warning: 'CdpWarning'): """Warning handler for CDPy SDK""" - self.module.warn(warning.message) + if self.module._debug or self.module._verbosity >= 2: + self.module.warn(warning.message) @staticmethod def argument_spec(**spec): From 5f2a37cc4054afb33d43b427c0d6af697ac89395 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:42 -0400 Subject: [PATCH 19/25] Update log messaging Signed-off-by: Webster Mudge --- plugins/modules/dw_cluster.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index 384054d2..1bf54082 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -251,7 +251,7 @@ def process(self): elif len(listing) == 0: self.target = None else: - self.module.fail_json(msg="Received multiple (i.e. ambiguous) DW Clusters in Environment %s" % self.env) + self.module.fail_json(msg="Received multiple (i.e. ambiguous) Clusters in Environment %s" % self.env) else: self.target = None @@ -264,7 +264,7 @@ def process(self): else: self.changed = True if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: - self.module.warn("DW Cluster is not in a valid state for Delete operations: %s" % self.target['status']) + self.module.warn("Cluster is not in a valid state for Delete operations: %s" % self.target['status']) else: _ = self.cdpy.dw.delete_cluster(cluster_id=self.name, force=self.force) @@ -280,7 +280,7 @@ def process(self): # End Delete elif self.state == 'present': # Begin Config Check - self.module.warn("DW Cluster is already present and reconciliation is not yet implemented") + self.module.warn("Cluster is already present and reconciliation is not yet implemented") if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_cluster, @@ -295,7 +295,7 @@ def process(self): else: # Begin Cluster Not Found if self.state == 'absent': - self.module.warn("DW Cluster %s already absent in Environment %s" % (self.name, self.env)) + self.module.warn("Cluster %s already absent in Environment %s" % (self.name, self.env)) elif self.state == 'present': if not self.module.check_mode: # Begin Cluster Creation From eff634ff4c67ccbe5730577656b786b99a877ab9 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:42 -0400 Subject: [PATCH 20/25] Update module variable requirements Update deletion states and process Update log messaging Signed-off-by: Webster Mudge --- plugins/modules/dw_virtual_warehouse.py | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index e049c219..59ea5416 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -167,7 +167,7 @@ default: present choices: - present - - absent + - absent wait: description: - Flag to enable internal polling to wait for the Virtual Warehouse to achieve the declared state. @@ -359,29 +359,30 @@ def process(self): else: # Begin Drop if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: - self.module.warn( - "DW Virtual Warehouse not in valid state for Delete operation: %s" % self.target['status']) + self.module.fail_json(msg="Virtual Warehouse not in valid state for Delete operation: %s" % + self.target['status']) else: _ = self.cdpy.dw.delete_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) self.changed = True - if self.wait: - self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_vw, - params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), - field=None, delay=self.delay, timeout=self.timeout - ) - else: - self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync - self.virtual_warehouse = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) + if self.wait: + self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_vw, + params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), + field=None, delay=self.delay, timeout=self.timeout + ) + else: + self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync + self.virtual_warehouse = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.target['id']) # End Drop elif self.state == 'present': # Begin Config check - self.module.warn("DW Virtual Warehouse already present and reconciliation is not implemented") - if self.wait: + self.module.warn("Virtual Warehouse already present and reconciliation is not yet implemented") + if self.wait and not self.module.check_mode: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, params=dict(cluster_id=self.cluster_id, vw_id=self.target['id']), - state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, timeout=self.timeout + state=self.cdpy.sdk.STARTED_STATES + self.cdpy.sdk.STOPPED_STATES, delay=self.delay, + timeout=self.timeout ) self.virtual_warehouse = self.target # End Config check @@ -391,8 +392,7 @@ def process(self): else: # Begin Virtual Warehouse Not Found if self.state == 'absent': - self.module.warn( - "DW Virtual Warehouse %s already absent in Cluster %s" % (self.name, self.cluster_id)) + self.module.warn("Virtual Warehouse is already absent in Cluster %s" % self.cluster_id) elif self.state == 'present': if not self.module.check_mode: vw_id = self.cdpy.dw.create_vw(cluster_id=self.cluster_id, @@ -441,7 +441,7 @@ def main(): )), application_configs=dict(type='dict'), ldap_groups=dict(type='list'), - enable_sso=dict(type='bool'), + enable_sso=dict(type='bool', default=False), tags=dict(type='dict'), state=dict(type='str', choices=['present', 'absent'], default='present'), wait = dict(type='bool', default=True), @@ -450,7 +450,7 @@ def main(): ), required_if=[ ['state', 'absent', ['id']], - ['state', 'present', ['dbc_id', 'type', 'name'], True] + ['state', 'present', ['dbc_id', 'type', 'name']] ], supports_check_mode=True ) From 68a96ba4b1e05852e15b59ad47c2cf56a97aff0a Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:42 -0400 Subject: [PATCH 21/25] Update deletion states and process Update module parameter requirements Update log messaging Signed-off-by: Webster Mudge --- plugins/modules/dw_database_catalog.py | 31 +++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/plugins/modules/dw_database_catalog.py b/plugins/modules/dw_database_catalog.py index af74564b..3ecb9d43 100644 --- a/plugins/modules/dw_database_catalog.py +++ b/plugins/modules/dw_database_catalog.py @@ -156,7 +156,7 @@ def process(self): if self.id is None: dbcs = self.cdpy.dw.list_dbcs(cluster_id=self.cluster_id) for dbc in dbcs: - if self.name is not None and dbc['name'] == self.name: + if dbc['name'] == self.name: self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc['id']) else: self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.id) @@ -169,24 +169,24 @@ def process(self): else: # Begin Drop if self.target['status'] not in self.cdpy.sdk.REMOVABLE_STATES: - self.module.warn( - "DW Database Catalog is not in a valid state for Delete operations: %s" % self.target['status']) + self.module.fail_json(msg= + "Database Catalog is not in a valid state for Delete operations: %s" % self.target['status']) else: _ = self.cdpy.dw.delete_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) self.changed = True - if self.wait: - self.cdpy.sdk.wait_for_state( - describe_func=self.cdpy.dw.describe_dbc, - params=dict(cluster_id=self.cluster_id, dbc_id=self.target['id']), - field=None, delay=self.delay, timeout=self.timeout - ) - else: - self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync - self.database_catalog = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) + if self.wait: + self.cdpy.sdk.wait_for_state( + describe_func=self.cdpy.dw.describe_dbc, + params=dict(cluster_id=self.cluster_id, dbc_id=self.target['id']), + field=None, delay=self.delay, timeout=self.timeout + ) + else: + self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync + self.database_catalog = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) # End Drop elif self.state == 'present': # Begin Config Check - self.module.warn("DW Database Catalog already present and reconciliation is not yet implemented") + self.module.warn("Database Catalog already present and reconciliation is not yet implemented") if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, @@ -201,7 +201,7 @@ def process(self): else: # Begin Database Catalog Not Found if self.state == 'absent': - self.module.warn("DW Database Catalog %s already absent in Cluster %s" % (self.name, self.cluster_id)) + self.module.warn("Database Catalog %s already absent in Cluster %s" % (self.name, self.cluster_id)) elif self.state == 'present': if not self.module.check_mode: dbc_id = self.cdpy.dw.create_dbc(cluster_id=self.cluster_id, name=self.name, @@ -233,8 +233,9 @@ def main(): ), required_if=[ ['state', 'present', ['name']], - ['state', 'absent', ['name', 'id']], + ['state', 'absent', ['name', 'id'], True], ], + mutually_exclusive=[['name', 'id']], supports_check_mode=True ) From 73dbad479b590a73a72396811546822ce317b536 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:43 -0400 Subject: [PATCH 22/25] Refactor scope to only return cluster details Remove 'name' parameter Refactor remaining parameters for aliases and requirements Signed-off-by: Webster Mudge --- plugins/modules/dw_cluster_info.py | 125 +++++++++++++++-------------- 1 file changed, 65 insertions(+), 60 deletions(-) diff --git a/plugins/modules/dw_cluster_info.py b/plugins/modules/dw_cluster_info.py index a9c0fab9..3fe6d9de 100644 --- a/plugins/modules/dw_cluster_info.py +++ b/plugins/modules/dw_cluster_info.py @@ -34,20 +34,18 @@ requirements: - cdpy options: - id: + cluster_id: description: - - If a name is provided, that Data Warehouse Cluster will be described. - - environment must be provided if using name to retrieve a Cluster + - The identifier of the Data Warehouse Cluster. + - Mutually exclusive with I(environment). type: str - required: False aliases: - - name + - id environment: description: - - The name of the Environment in which to find and describe the Data Warehouse Clusters. - - Required with name to retrieve a Cluster + - The name or CRN of the Environment in which to find and describe Data Warehouse Clusters. + - Mutually exclusive with I(cluster_id). type: str - required: False aliases: - env extends_documentation_fragment: @@ -58,67 +56,71 @@ EXAMPLES = r''' # Note: These examples do not set authentication details. -# List basic information about all Data Warehouse Clusters +# List information about all Data Warehouse Clusters - cloudera.cloud.dw_cluster_info: -# Gather detailed information about a named Cluster +# Gather information about all Data Warehouse Clusters within an Environment - cloudera.cloud.dw_cluster_info: - name: example-cluster env: example-environment + +# Gather information about an identified Cluster +- cloudera.cloud.dw_cluster_info: + id: env-xyzabc ''' RETURN = r''' --- clusters: description: The information about the named Cluster or Clusters - type: list returned: always - elements: complex + type: list + elements: dict contains: - cluster: + id: + description: The cluster identifier. + returned: always + type: str + environmentCrn: + description: The CRN of the cluster's Environment + returned: always + type: str + crn: + description: The cluster's CRN. + returned: always + type: str + creationDate: + description: The creation timestamp of the cluster in UTC. + returned: always + type: str + status: + description: The status of the cluster + returned: always + type: str + creator: + description: The cluster creator details. + returned: always type: dict contains: - name: - description: The name of the cluster. - returned: always - type: str - environmentCrn: - description: The crn of the cluster's environment. - returned: always - type: str crn: - description: The cluster's crn. - returned: always + description: The Actor CRN. type: str - creationDate: - description: The creation time of the cluster in UTC. returned: always + email: + description: Email address (users). type: str - status: - description: The status of the Cluster - returned: always + returned: when supported + workloadUsername: + description: Username (users). type: str - creator: - description: The CRN of the cluster creator. - returned: always - type: dict - contains: - crn: - type: str - description: Actor CRN - email: - type: str - description: Email address for users - workloadUsername: - type: str - description: Username for users - machineUsername: - type: str - description: Username for machine users - cloudPlatform: - description: The cloud platform of the environment that was used to create this cluster - returned: always + returned: when supported + machineUsername: + description: Username (machine users). type: str + returned: when supported + cloudPlatform: + description: The cloud platform of the environment that was used to create this cluster. + returned: always + type: str sdk_out: description: Returns the captured CDP SDK log. returned: when supported @@ -136,8 +138,8 @@ def __init__(self, module): super(DwClusterInfo, self).__init__(module) # Set variables - self.id = self._get_param('name') - self.env = self._get_param('env') + self.cluster_id = self._get_param('cluster_id') + self.environment = self._get_param('environment') # Initialize return values self.clusters = [] @@ -147,24 +149,27 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): - if self.id is not None: - cluster_single = self.cdpy.dw.describe_cluster(name=self.id) + if self.cluster_id is not None: + cluster_single = self.cdpy.dw.describe_cluster(self.cluster_id) if cluster_single is not None: self.clusters.append(cluster_single) - if self.env is not None: - env_crn = self.cdpy.environments.resolve_environment_crn(self.env) - if env_crn is not None: - self.clusters = self.cdpy.dw.gather_clusters(env_crn) + elif self.environment is not None: + env_crn = self.cdpy.environments.resolve_environment_crn(self.environment) + if env_crn: + self.clusters = self.cdpy.dw.list_clusters(env_crn=env_crn) else: - self.clusters = self.cdpy.dw.gather_clusters() + self.clusters = self.cdpy.dw.list_clusters() def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(required=False, type='str', aliases=['name']), - env=dict(required=False, type='str', aliases=['environment']) + cluster_id=dict(type='str', aliases=['id']), + environment=dict(type='str', aliases=['env']) ), + mutually_exclusive=[ + ['cluster_id', 'environment'] + ], supports_check_mode=True ) From e4a940431e7feca6cf984407a4487a9c9fd84764 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:43 -0400 Subject: [PATCH 23/25] Add dw_virtual_warehouse_info module Signed-off-by: Webster Mudge --- docsrc/index.rst | 1 + plugins/README.md | 1 + plugins/modules/dw_virtual_warehouse_info.py | 239 +++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 plugins/modules/dw_virtual_warehouse_info.py diff --git a/docsrc/index.rst b/docsrc/index.rst index 6c4b2458..0065294d 100644 --- a/docsrc/index.rst +++ b/docsrc/index.rst @@ -22,6 +22,7 @@ cloudera.cloud Ansible Collection dw_database_catalog dw_database_catalog_info dw_virtual_warehouse + dw_virtual_warehouse_info env env_auth env_auth_info diff --git a/plugins/README.md b/plugins/README.md index a1243141..09e8ab8a 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -23,6 +23,7 @@ modules employ the underlying SDK contained within the `cdpy` Python package. | [dw_database_catalog](./modules/dw_database_catalog.py) | Create, manage, and destroy CDP Data Warehouse Data Catalogs | | [dw_database_catalog_info](./modules/dw_database_catalog_info.py) | Gather information about CDP Data Warehouse Data Catalogs | | [dw_virtual_warehouse](./modules/dw_virtual_warehouse.py) | Create, manage, and destroy CDP Data Warehouse Virtual Warehouses | +| [dw_virtual_warehouse_info](./modules/dw_virtual_warehouse_info.py) | Gather information about CDP Data Warehouse Virtual Warehouses | | [env](./modules/env.py) | Create, manage, and destroy CDP Environments | | [env_auth](./modules/env_auth.py) | Set authentication details for CDP Environments | | [env_auth_info](./modules/env_auth_info.py) | Gather information about CDP Environment authentication details | diff --git a/plugins/modules/dw_virtual_warehouse_info.py b/plugins/modules/dw_virtual_warehouse_info.py new file mode 100644 index 00000000..6351f3b5 --- /dev/null +++ b/plugins/modules/dw_virtual_warehouse_info.py @@ -0,0 +1,239 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2021 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.cloudera.cloud.plugins.module_utils.cdp_common import CdpModule + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + +DOCUMENTATION = r''' +--- +module: dw_virtual_warehouse_info +short_description: Gather information about CDP Data Warehouse Virtual Warehouses +description: + - Gather information about CDP Virtual Warehouses +author: + - "Webster Mudge (@wmudge)" + - "Dan Chaffelson (@chaffelson)" + - "Saravanan Raju (@raju-saravanan)" +requirements: + - cdpy +options: + id: + description: + - The identifier of the Virtual Warehouse. + - Requires I(cluster_id). + - Mutually exclusive with I(name) and I(dbc_id). + type: str + aliases: + - vw_id + cluster_id: + description: + - The identifier of the parent Data Warehouse Cluster of the Virtual Warehouse(s). + type: str + dbc_id: + description: + - The identifier of the parent Database Catalog attached to the Virtual Warehouse(s). + - Requires I(cluster_id). + - Mutally exclusive with I(id) and I(name). + type: str + name: + description: + - The name of the Virtual Warehouse. + - Requires I(cluster_id). + - Mutually exclusive with I(id) and I(dbc_id). + type: str + delay: + description: + - The internal polling interval (in seconds) while the module waits for the Virtual Warehouse to achieve the declared + state. + type: int + default: 15 + aliases: + - polling_delay + timeout: + description: + - The internal polling timeout (in seconds) while the module waits for the Virtual Warehouse to achieve the declared + state. + type: int + default: 3600 + aliases: + - polling_timeout +extends_documentation_fragment: + - cloudera.cloud.cdp_sdk_options + - cloudera.cloud.cdp_auth_options +''' + +EXAMPLES = r''' +# Note: These examples do not set authentication details. + +# List all Virtual Warehouses in a Cluster +- cloudera.cloud.dw_virtual_warehouse_info: + cluster_id: example-cluster-id + +# List all Virtual Warehouses associated with a Data Catalog +- cloudera.cloud.dw_virtual_warehouse_info: + cluster_id: example-cluster-id + dbc_id: example-data-catalog-id + +# Describe a Virtual Warehouse by ID +- cloudera.cloud.dw_virtual_warehouse_info: + cluster_id: example-cluster-id + id: example-virtual-warehouse-id + +# Describe a Virtual Warehouse by name +- cloudera.cloud.dw_virtual_warehouse_info: + cluster_id: example-cluster-id + name: example-virtual-warehouse +''' + +RETURN = r''' +--- +virtual_warehouses: + description: The details about the CDP Data Warehouse Virtual Warehouse(s). + type: list + elements: dict + contains: + id: + description: The identifier of the Virtual Warehouse. + returned: always + type: str + name: + description: The name of the Virtual Warehouse. + returned: always + type: str + vwType: + description: The Virtual Warehouse type. + returned: always + type: str + dbcId: + description: The Database Catalog ID associated with the Virtual Warehouse. + returned: always + type: str + creationDate: + description: The creation time of the Virtual Warehouse in UTC. + returned: always + type: str + status: + description: The status of the Virtual Warehouse. + returned: always + type: str + creator: + description: Details about the Virtual Warehouse creator. + returned: always + type: dict + suboptions: + crn: + description: The creator's Actor CRN. + type: str + returned: always + email: + description: Email address (for users). + type: str + returned: when supported + workloadUsername: + description: Username (for users). + type: str + returned: when supported + machineUsername: + description: Username (for machine users). + type: str + returned: when supported + tags: + description: Custom tags applied to the Virtual Warehouse. + returned: always + type: dict +sdk_out: + description: Returns the captured CDP SDK log. + returned: when supported + type: str +sdk_out_lines: + description: Returns a list of each line of the captured CDP SDK log. + returned: when supported + type: list + elements: str +''' + + +class DwVwInfo(CdpModule): + def __init__(self, module): + super(DwVwInfo, self).__init__(module) + + # Set variables + self.id = self._get_param('id') + self.cluster_id = self._get_param('cluster_id') + self.dbc_id = self._get_param('dbc_id') + self.type = self._get_param('type') + self.name = self._get_param('name') + self.delay = self._get_param('delay') + self.timeout = self._get_param('timeout') + + # Initialize return values + self.virtual_warehouses = [] + + # Execute logic process + self.process() + + @CdpModule._Decorators.process_debug + def process(self): + if self.id is not None: + target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.id) + if target is not None: + self.virtual_warehouses.append(target) + else: + vws = self.cdpy.dw.list_vws(cluster_id=self.cluster_id) + if self.name is not None: + for vw in vws: + if vw['name'] == self.name: + self.virtual_warehouses.append( + self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw['id']) + ) + elif self.dbc_id is not None: + self.virtual_warehouses =[v for v in vws if v['dbcId'] == self.dbc_id] + else: + self.virtual_warehouses = vws + + +def main(): + module = AnsibleModule( + argument_spec=CdpModule.argument_spec( + id=dict(type='str', aliases=['vw_id']), + cluster_id=dict(required=True, type='str'), + dbc_id=dict(type='str'), + name=dict(type='str'), + delay=dict(type='int', aliases=['polling_delay'], default=15), + timeout=dict(type='int', aliases=['polling_timeout'], default=3600) + ), + mutually_exclusive=[ + ['id', 'name', 'dbc_id'] + ], + supports_check_mode=True + ) + + result = DwVwInfo(module) + output = dict(changed=False, virtual_warehouses=result.virtual_warehouses) + + if result.debug: + output.update(sdk_out=result.log_out, sdk_out_lines=result.log_lines) + + module.exit_json(**output) + + +if __name__ == '__main__': + main() From 02749f8553ebdc1e56ae7185fd6597b55487f7ea Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:14:43 -0400 Subject: [PATCH 24/25] Update parameter naming, aliases, and requirements Signed-off-by: Webster Mudge --- plugins/modules/dw_cluster.py | 54 ++++++++++++++----------- plugins/modules/dw_virtual_warehouse.py | 16 ++++---- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index 1bf54082..f564d940 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -35,17 +35,19 @@ requirements: - cdpy options: - name: + cluster_id: description: - The identifier of the Data Warehouse Cluster. - - Required if C(state=absent) and C(env) is not specified. + - Required if I(state=absent) and I(env) is not specified. type: str aliases: - id + - name env: description: - The name of the target environment. - - Required if C(state=present) or C(state=absent) and C(id) is not specified. + - Required if I(state=present). + - Required if I(state=absent) and I(cluster_id) is not specified. type: str aliases: - environment @@ -63,24 +65,24 @@ aws_public_subnets: description: - List of zero or more Public AWS Subnet IDs used for deployment. - - Required if C(state=present) and the C(env) is deployed to AWS. + - Required if I(state=present) and the I(env) is deployed to AWS. type: list elements: str aws_private_subnets: description: - List of zero or more Private AWS Subnet IDs used for deployment. - - Required if C(state=present) and the C(env) is deployed to AWS. + - Required if I(state=present) and the I(env) is deployed to AWS. type: list elements: str az_subnet: description: - The Azure Subnet Name. - - Required if C(state=present) and the C(env) is deployed to Azure. + - Required if I(state=present) and the I(env) is deployed to Azure. type: str az_enable_az: description: - Flag to enable Availability Zone mode. - - Required if C(state=present) and the C(env) is deployed to Azure. + - Required if I(state=present) and the I(env) is deployed to Azure. type: bool state: description: The state of the Data Warehouse Cluster @@ -154,12 +156,12 @@ description: Details for the Data Warehouse cluster type: dict contains: - name: - description: The name of the cluster. + id: + description: The cluster identifier. returned: always type: str environmentCrn: - description: The crn of the cluster's environment. + description: The CRN of the cluster's Environment returned: always type: str crn: @@ -167,32 +169,36 @@ returned: always type: str creationDate: - description: The creation time of the cluster in UTC. + description: The creation timestamp of the cluster in UTC. returned: always type: str status: - description: The status of the cluster. + description: The status of the cluster returned: always type: str creator: - description: The details regarding the cluster creator. + description: The cluster creator details. returned: always type: dict contains: crn: + description: The Actor CRN. type: str - description: The creator's CRN + returned: always email: + description: Email address (users). type: str - description: Email address + returned: when supported workloadUsername: + description: Username (users). type: str - description: Username + returned: when supported machineUsername: + description: Username (machine users). type: str - description: Username for machine users + returned: when supported cloudPlatform: - description: The cloud platform of the environment housing the Data Warehouse cluster + description: The cloud platform of the environment that was used to create this cluster. returned: always type: str sdk_out: @@ -325,14 +331,14 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(type='str', aliases=['id']), + cluster_id=dict(type='str', aliases=['id', 'name']), env=dict(type='str', aliases=['environment', 'env_crn']), overlay=dict(type='bool', default=False), private_load_balancer=dict(type='bool', default=False), - az_subnet=dict(type='str', default=None), - az_enable_az=dict(type='bool', default=None), - aws_public_subnets=dict(type='list', default=None), - aws_private_subnets=dict(type='list', default=None), + az_subnet=dict(type='str'), + az_enable_az=dict(type='bool'), + aws_public_subnets=dict(type='list'), + aws_private_subnets=dict(type='list'), state=dict(type='str', choices=['present', 'absent'], default='present'), force=dict(type='bool', default=False), wait=dict(type='bool', default=True), @@ -344,7 +350,7 @@ def main(): ['aws_public_subnets', 'aws_private_subnets'] ], required_if=[ - ['state', 'absent', ['name', 'env']], + ['state', 'absent', ['cluster_id', 'env'], True], ['state', 'present', ['env']] ], supports_check_mode=True diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 59ea5416..32ff46ef 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -40,6 +40,8 @@ - The identifier of the Virtual Warehouse. - Required if C(state=absent). type: str + aliases: + - vw_id cluster_id: description: - The identifier of the parent Data Warehouse Cluster of the Virtual Warehouse. @@ -246,7 +248,7 @@ virtual_warehouse: description: The details about the CDP Data Warehouse Virtual Warehouse. type: dict - suboptions: + contains: id: description: The identifier of the Virtual Warehouse. returned: always @@ -272,25 +274,25 @@ returned: always type: str creator: - description: The CRN of the Virtual Warehouse creator. + description: Details about the Virtual Warehouse creator. returned: always type: dict suboptions: crn: + description: The creator's Actor CRN. type: str - description: The creator's Actor CRN returned: always email: + description: Email address (for users). type: str - description: Email address (for users) returned: when supported workloadUsername: + description: Username (for users). type: str - description: Username (for users) returned: when supported machineUsername: + description: Username (for machine users). type: str - description: Username (for machine users) returned: when supported tags: description: Custom tags applied to the Virtual Warehouse. @@ -420,7 +422,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(type='str'), + id=dict(type='str', aliases=['vw_id']), cluster_id=dict(required=True, type='str'), dbc_id=dict(type='str'), type = dict(type='str'), From 1302819b66a5e371f4ef9da0c255a2fd521b5e68 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 16 Sep 2021 09:47:49 -0400 Subject: [PATCH 25/25] Clarify parameter names and aliases for DW modules Signed-off-by: Webster Mudge --- plugins/modules/dw_cluster.py | 2 +- plugins/modules/dw_cluster_info.py | 2 +- plugins/modules/dw_database_catalog.py | 20 +++++----- plugins/modules/dw_database_catalog_info.py | 18 +++++---- plugins/modules/dw_virtual_warehouse.py | 31 ++++++++------- plugins/modules/dw_virtual_warehouse_info.py | 41 +++++++++++--------- 6 files changed, 62 insertions(+), 52 deletions(-) diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index f564d940..df0b56b6 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -142,7 +142,7 @@ # Delete a Data Warehouse Cluster - cloudera.cloud.dw_cluster: state: absent - id: my-id + cluster_id: my-id # Delete the Data Warehouse Cluster within the Environment - cloudera.cloud.dw_cluster: diff --git a/plugins/modules/dw_cluster_info.py b/plugins/modules/dw_cluster_info.py index 3fe6d9de..7892b727 100644 --- a/plugins/modules/dw_cluster_info.py +++ b/plugins/modules/dw_cluster_info.py @@ -65,7 +65,7 @@ # Gather information about an identified Cluster - cloudera.cloud.dw_cluster_info: - id: env-xyzabc + cluster_id: env-xyzabc ''' RETURN = r''' diff --git a/plugins/modules/dw_database_catalog.py b/plugins/modules/dw_database_catalog.py index 3ecb9d43..168d654a 100644 --- a/plugins/modules/dw_database_catalog.py +++ b/plugins/modules/dw_database_catalog.py @@ -35,11 +35,13 @@ requirements: - cdpy options: - id: + catalog_id: description: - The identifier of the Database Catalog. - Required if C(state=absent). type: str + aliases: + - id cluster_id: description: - The identifier of the parent DW Cluster of the Database Catalog. @@ -91,7 +93,7 @@ # Delete Database Catalog - cloudera.cloud.dw_database_catalog: - id: example-database-id + catalog_id: example-database-id cluster_id: example-cluster-id state: absent ''' @@ -127,12 +129,12 @@ ''' -class DwDbc(CdpModule): +class DwDatabaseCatalog(CdpModule): def __init__(self, module): - super(DwDbc, self).__init__(module) + super(DwDatabaseCatalog, self).__init__(module) # Set variables - self.id = self._get_param('id') + self.catalog_id = self._get_param('catalog_id') self.cluster_id = self._get_param('cluster_id') self.name = self._get_param('name') self.load_demo_data = self._get_param('load_demo_data') @@ -153,13 +155,13 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): - if self.id is None: + if self.catalog_id is None: dbcs = self.cdpy.dw.list_dbcs(cluster_id=self.cluster_id) for dbc in dbcs: if dbc['name'] == self.name: self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=dbc['id']) else: - self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.id) + self.target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.catalog_id) if self.target is not None: # Begin Database Catalog Exists @@ -222,7 +224,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(type='str'), + catalog_id=dict(type='str', aliases=['catalog_id']), cluster_id=dict(required=True, type='str'), name = dict(type='str'), load_demo_data=dict(type='bool'), @@ -239,7 +241,7 @@ def main(): supports_check_mode=True ) - result = DwDbc(module) + result = DwDatabaseCatalog(module) output = dict(changed=result.changed, database_catalog=result.database_catalog) if result.debug: diff --git a/plugins/modules/dw_database_catalog_info.py b/plugins/modules/dw_database_catalog_info.py index b8deed1a..17ec07d6 100644 --- a/plugins/modules/dw_database_catalog_info.py +++ b/plugins/modules/dw_database_catalog_info.py @@ -35,12 +35,14 @@ requirements: - cdpy options: - id: + catalog_id: description: - The identifier of the Database Catalog. - If undefined, will return a list of all Database Catalogs in the Cluster. - Exclusive with I(name). type: str + aliases: + - id cluster_id: description: - The identifier of the parent Cluster of the Database Catalog or Catalogs. @@ -102,12 +104,12 @@ ''' -class DwDbcInfo(CdpModule): +class DwDatabaseCatalogInfo(CdpModule): def __init__(self, module): - super(DwDbcInfo, self).__init__(module) + super(DwDatabaseCatalogInfo, self).__init__(module) # Set variables - self.id = self._get_param('id') + self.catalog_id = self._get_param('catalog_id') self.cluster_id = self._get_param('cluster_id') self.name = self._get_param('name') @@ -119,8 +121,8 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): - if self.id is not None: - target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.id) + if self.catalog_id is not None: + target = self.cdpy.dw.describe_dbc(cluster_id=self.cluster_id, dbc_id=self.catalog_id) if target is not None: self.database_catalogs.append(target) else: @@ -136,7 +138,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(type='str'), + catalog_id=dict(type='str', aliases=['id']), cluster_id=dict(required=True, type='str'), name = dict(type='str'), ), @@ -144,7 +146,7 @@ def main(): supports_check_mode=True ) - result = DwDbcInfo(module) + result = DwDatabaseCatalogInfo(module) output = dict(changed=False, database_catalogs=result.database_catalogs) if result.debug: diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 32ff46ef..02b4deeb 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -35,23 +35,26 @@ requirements: - cdpy options: - id: + warehouse_id: description: - The identifier of the Virtual Warehouse. - Required if C(state=absent). type: str aliases: - vw_id + - id cluster_id: description: - The identifier of the parent Data Warehouse Cluster of the Virtual Warehouse. type: str required: True - dbc_id: + catalog_id: description: - The identifier of the parent Database Catalog attached to the Virtual Warehouse. - Required if C(state=present) type: str + aliases: + - dbc_id type: description: - The type of Virtual Warehouse to be created. @@ -239,7 +242,7 @@ # Delete a Virtual Warehouse - cloudera.cloud.dw_virtual_warehouse: cluster_id: example-cluster-id - id: example-virtual-warehouse-id + warehouse_id: example-virtual-warehouse-id state: absent ''' @@ -310,14 +313,14 @@ ''' -class DwVw(CdpModule): +class DwVirtualWarehouse(CdpModule): def __init__(self, module): - super(DwVw, self).__init__(module) + super(DwVirtualWarehouse, self).__init__(module) # Set variables - self.id = self._get_param('id') + self.warehouse_id = self._get_param('warehouse_id') self.cluster_id = self._get_param('cluster_id') - self.dbc_id = self._get_param('dbc_id') + self.dbc_id = self._get_param('catalog_id') self.type = self._get_param('type') self.name = self._get_param('name') self.template = self._get_param('template') @@ -345,13 +348,13 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): - if self.id is None: + if self.warehouse_id is None: vws = self.cdpy.dw.list_vws(cluster_id=self.cluster_id) for vw in vws: if self.name is not None and vw['name'] == self.name: self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw['id']) else: - self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.id) + self.target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.warehouse_id) if self.target is not None: # Begin Virtual Warehouse Exists @@ -422,9 +425,9 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(type='str', aliases=['vw_id']), + warehouse_id=dict(type='str', aliases=['vw_id', 'id']), cluster_id=dict(required=True, type='str'), - dbc_id=dict(type='str'), + catalog_id=dict(type='str', aliases=['dbc_id']), type = dict(type='str'), name = dict(type='str'), template=dict(type='str', choices=['xsmall', 'small', 'medium', 'large']), @@ -451,13 +454,13 @@ def main(): timeout = dict(type='int', aliases=['polling_timeout'], default=3600) ), required_if=[ - ['state', 'absent', ['id']], - ['state', 'present', ['dbc_id', 'type', 'name']] + ['state', 'absent', ['warehouse_id']], + ['state', 'present', ['catalog_id', 'type', 'name']] ], supports_check_mode=True ) - result = DwVw(module) + result = DwVirtualWarehouse(module) output = dict(changed=result.changed, virtual_warehouse=result.virtual_warehouse) if result.debug: diff --git a/plugins/modules/dw_virtual_warehouse_info.py b/plugins/modules/dw_virtual_warehouse_info.py index 6351f3b5..0f9808bc 100644 --- a/plugins/modules/dw_virtual_warehouse_info.py +++ b/plugins/modules/dw_virtual_warehouse_info.py @@ -35,29 +35,32 @@ requirements: - cdpy options: - id: + warehouse_id: description: - The identifier of the Virtual Warehouse. - Requires I(cluster_id). - - Mutually exclusive with I(name) and I(dbc_id). + - Mutually exclusive with I(name) and I(catalog_id). type: str aliases: - vw_id + - id cluster_id: description: - The identifier of the parent Data Warehouse Cluster of the Virtual Warehouse(s). type: str - dbc_id: + catalog_id: description: - The identifier of the parent Database Catalog attached to the Virtual Warehouse(s). - Requires I(cluster_id). - - Mutally exclusive with I(id) and I(name). + - Mutally exclusive with I(warehouse_id) and I(name). type: str + aliases: + - dbc_id name: description: - The name of the Virtual Warehouse. - Requires I(cluster_id). - - Mutually exclusive with I(id) and I(dbc_id). + - Mutually exclusive with I(warehouse_id) and I(catalog_id). type: str delay: description: @@ -90,12 +93,12 @@ # List all Virtual Warehouses associated with a Data Catalog - cloudera.cloud.dw_virtual_warehouse_info: cluster_id: example-cluster-id - dbc_id: example-data-catalog-id + catalog_id: example-data-catalog-id # Describe a Virtual Warehouse by ID - cloudera.cloud.dw_virtual_warehouse_info: cluster_id: example-cluster-id - id: example-virtual-warehouse-id + warehouse_id: example-virtual-warehouse-id # Describe a Virtual Warehouse by name - cloudera.cloud.dw_virtual_warehouse_info: @@ -171,14 +174,14 @@ ''' -class DwVwInfo(CdpModule): +class DwVirtualWarehouseInfo(CdpModule): def __init__(self, module): - super(DwVwInfo, self).__init__(module) + super(DwVirtualWarehouseInfo, self).__init__(module) # Set variables - self.id = self._get_param('id') + self.warehouse_id = self._get_param('warehouse_id') self.cluster_id = self._get_param('cluster_id') - self.dbc_id = self._get_param('dbc_id') + self.catalog_id = self._get_param('catalog_id') self.type = self._get_param('type') self.name = self._get_param('name') self.delay = self._get_param('delay') @@ -192,8 +195,8 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): - if self.id is not None: - target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.id) + if self.warehouse_id is not None: + target = self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=self.warehouse_id) if target is not None: self.virtual_warehouses.append(target) else: @@ -204,8 +207,8 @@ def process(self): self.virtual_warehouses.append( self.cdpy.dw.describe_vw(cluster_id=self.cluster_id, vw_id=vw['id']) ) - elif self.dbc_id is not None: - self.virtual_warehouses =[v for v in vws if v['dbcId'] == self.dbc_id] + elif self.catalog_id is not None: + self.virtual_warehouses =[v for v in vws if v['dbcId'] == self.catalog_id] else: self.virtual_warehouses = vws @@ -213,20 +216,20 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - id=dict(type='str', aliases=['vw_id']), + warehouse_id=dict(type='str', aliases=['vw_id', 'id']), cluster_id=dict(required=True, type='str'), - dbc_id=dict(type='str'), + catalog_id=dict(type='str', aliases=['dbc_id']), name=dict(type='str'), delay=dict(type='int', aliases=['polling_delay'], default=15), timeout=dict(type='int', aliases=['polling_timeout'], default=3600) ), mutually_exclusive=[ - ['id', 'name', 'dbc_id'] + ['warehouse_id', 'name', 'catalog_id'] ], supports_check_mode=True ) - result = DwVwInfo(module) + result = DwVirtualWarehouseInfo(module) output = dict(changed=False, virtual_warehouses=result.virtual_warehouses) if result.debug: