Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/modules/datahub_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
description:
- L(JMESPath,https://jmespath.org/) expression to filter the subnets to be used for the load balancer
- The expression will be applied to the full list of subnets for the specified environment
- Each subnet in the list is an object with the following attributes: subnetId, subnetName, availabilityZone, cidr
- Each subnet in the list is an object with the following attributes - subnetId, subnetName, availabilityZone, cidr
- The filter expression must only filter the list, but not apply any attribute projection
- Mutually exclusive with the subnet and subnets options
type: list
Expand Down
16 changes: 15 additions & 1 deletion plugins/modules/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
force:
description:
- Flag to remove CDP and cloud provider resources, but ignore cloud provider resources deletion errors.
- NOTE: this option might leave cloud provider resources after deletion.
- NOTE, this option might leave cloud provider resources after deletion.
type: bool
required: False
default: False
Expand Down Expand Up @@ -292,6 +292,14 @@
type: list
elements: str
required: False
zones:
description:
- (GCP) The list of zones within the region to use for compute instances.
type: list
elements: str
required: False
aliases:
- availability_zones
extends_documentation_fragment:
- cloudera.cloud.cdp_sdk_options
- cloudera.cloud.cdp_auth_options
Expand Down Expand Up @@ -698,6 +706,8 @@ def __init__(self, module):

self.endpoint_access_scheme = self._get_param('endpoint_access_scheme')
self.endpoint_access_subnets = self._get_param('endpoint_access_subnets')

self.zones = self._get_param('zones')

self.use_single_resource_group=self._get_param('use_single_resource_group')

Expand Down Expand Up @@ -935,6 +945,9 @@ def _configure_payload(self):

if self.freeipa is not None:
payload['freeIpa'] = dict(instanceCountByGroup=self.freeipa['instanceCountByGroup'])

if self.zones is not None:
payload['availabilityZones'] = self.zones
else:
# For Azure
payload['securityAccess'] = dict(defaultSecurityGroupId=self.default_sg,
Expand Down Expand Up @@ -1079,6 +1092,7 @@ def main():
datahub_start=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),
zones=dict(required=False, type='list', elements='str', aliases=['availability_zones']),
endpoint_access_subnets=dict(required=False, type='list', elements='str'),
endpoint_access_scheme=dict(required=False, type='str', choices=['PUBLIC', 'PRIVATE']),
use_single_resource_group=dict(required=False, type='bool', default=False),
Expand Down