diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index 064e71e..dd52343 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -43,6 +43,15 @@ aliases: - id - name + custom_subdomain: + description: + - Custom environment subdomain. + - Overrides the environment subdomain using a customized domain. + type: str + database_backup_retention_period: + description: + - PostgreSQL server backup retention days + type: int env: description: - The name of the target environment. @@ -135,6 +144,18 @@ - Only a single instance type can be listed. type: list elements: str + reserved_compute_nodes: + description: + - Set additional number of nodes to reserve for executors and coordinators to use during autoscaling. + type: int + reserved_shared_services_nodes: + description: + - Set additional number of nodes to reserve for other services in the cluster. + type: int + resource_pool: + description: + - The Resource Pool of the cluster. + type: str state: description: The state of the Data Warehouse Cluster type: str @@ -148,6 +169,19 @@ - If set to FALSE, the module will return immediately. type: bool default: True + whitelist_workload_access_ip_cidrs: + description: The IP ranges authorized to connect for workload access + type: list + required: False + aliases: + - loadbalancer_ip_ranges + - workload_ip_ranges + whitelist_k8s_cluster_access_ip_cidrs: + description: The IP ranges authorized to connect to the Kubernetes API server + type: list + required: False + aliases: + - k8s_ip_ranges force: description: - Flag to enable force deletion of the Data Warehouse Cluster. @@ -283,6 +317,14 @@ def __init__(self, module): self.wait = self._get_param('wait') self.delay = self._get_param('delay') self.timeout = self._get_param('timeout') + self.custom_subdomain = self._get_param('custom_subdomain') + self.database_backup_retention_period = self._get_param('database_backup_retention_period') + self.reserved_compute_nodes = self._get_param('reserved_compute_nodes') + self.reserved_shared_services_nodes = self._get_param('reserved_shared_services_nodes') + self.resource_pool = self._get_param('resource_pool') + self.lb_ip_ranges = self._get_param('whitelist_workload_access_ip_cidrs') + self.k8s_ip_ranges = self._get_param('whitelist_k8s_cluster_access_ip_cidrs') + # Azure nested parameters self.az_compute_instance_types = self._get_nested_param('azure', 'compute_instance_types') self.az_enable_az = self._get_nested_param('azure', 'enable_az') @@ -379,7 +421,10 @@ def process(self): az_enable_private_aks=self.az_enable_private_aks, az_enable_private_sql=self.az_enable_private_sql, az_enable_spot_instances=self.az_enable_spot_instances, az_log_analytics_workspace_id=self.az_log_analytics_workspace_id, az_network_outbound_type=self.az_network_outbound_type, az_aks_private_dns_zone=self.az_aks_private_dns_zone, - az_compute_instance_types=self.az_compute_instance_types + az_compute_instance_types=self.az_compute_instance_types, + custom_subdomain=self.custom_subdomain, database_backup_retention_period=self.database_backup_retention_period, + reserved_compute_nodes=self.reserved_compute_nodes, reserved_shared_services_nodes=self.reserved_shared_services_nodes, + resource_pool=self.resource_pool, lb_ip_ranges=self.lb_ip_ranges, k8s_ip_ranges=self.k8s_ip_ranges ) if self.wait: self.cluster = self.cdpy.sdk.wait_for_state( @@ -399,6 +444,8 @@ def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( cluster_id=dict(type='str', aliases=['id', 'name']), + custom_subdomain=dict(type='str'), + database_backup_retention_period=dict(type='int'), env=dict(type='str', aliases=['environment', 'env_crn']), overlay=dict(type='bool', default=False), private_load_balancer=dict(type='bool', default=False), @@ -420,9 +467,14 @@ def main(): ), aws_lb_subnets=dict(type='list', aliases=['aws_public_subnets']), aws_worker_subnets=dict(type='list', aliases=['aws_private_subnets']), + reserved_compute_nodes=dict(type='int'), + reserved_shared_services_nodes=dict(type='int'), + resource_pool=dict(type='str'), state=dict(type='str', choices=['present', 'absent'], default='present'), force=dict(type='bool', default=False), wait=dict(type='bool', default=True), + whitelist_workload_access_ip_cidrs=dict(type='list', elements='str', default=None, aliases=['loadbalancer_ip_ranges','workload_ip_ranges']), + whitelist_k8s_cluster_access_ip_cidrs=dict(type='list', elements='str', default=None, aliases=['k8s_ip_ranges']), delay=dict(type='int', aliases=['polling_delay'], default=15), timeout=dict(type='int', aliases=['polling_timeout'], default=3600) ),