cloudera.cloud.df_service module – Enable or Disable CDP DataFlow Services
Note
This module is part of the cloudera.cloud collection (version 3.1.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install cloudera.cloud.
To use it in a playbook, specify: cloudera.cloud.df_service.
New in cloudera.cloud 1.2.0
Synopsis
Enable or Disable CDP DataFlow Services
Parameters
Parameter |
Comments |
|---|---|
If provided, the Cloudera on cloud API will use this value as its access key. If not provided, the API will attempt to use the value from the environment variable Required if Mutually exclusive with |
|
Subnet ids that will be assigned to the Kubernetes cluster Mutually exclusive with the cluster_subnets_filter option |
|
Filter expression to select subnets for the Kubernetes cluster Multiple formats supported:
The filter operates on subnet objects with attributes: subnetId, subnetName, availabilityZone, cidr Mutually exclusive with the cluster_subnets option. |
|
If provided, the Cloudera on cloud API will use this value as its credentials path. If not provided, the API will attempt to use the value from the environment variable Default: |
|
If Choices:
|
|
The internal polling interval (in seconds) while the module waits for the Dataflow Service to achieve the declared state. Default: |
|
The CRN of the DataFlow Service, if available Required when state=absent |
|
The Cloudera on cloud API endpoint to use. Mutually exclusive with |
|
Specify the Cloudera on cloud API endpoint region. See Cloudera Control Plane regions for more information. If not provided, the API will attempt to use the value from the environment variable
Mutually exclusive with Choices:
|
|
Verify the TLS certificates for the Cloudera on cloud API endpoint. Choices:
|
|
The CRN of the CDP Environment to host the Dataflow Service The environment name can also be provided, instead of the CRN Required when state=present |
|
Flag to indicate if the DataFlow deletion should be forced. Choices:
|
|
The HTTP user agent to use for Cloudera on cloud API requests. Default: |
|
Indicates custom instance type to be used for Kubernetes nodes Cloud provider specific (e.g., “m5.2xlarge” for AWS, “Standard_D8s_v3” for Azure) |
|
The IP ranges authorized to connect to the Kubernetes API server |
|
The IP ranges authorized to connect to the load balancer |
|
Subnet ids that will be assigned to the load balancer Mutually exclusive with the loadbalancer_subnets_filter option |
|
Filter expression to select subnets for the load balancer Multiple formats supported:
The filter operates on subnet objects with attributes: subnetId, subnetName, availabilityZone, cidr Mutually exclusive with the loadbalancer_subnets option. |
|
The maximum number of kubernetes nodes that environment may scale up under high-demand situations. Default: |
|
The minimum number of kubernetes nodes needed for the environment. Note that the lowest minimum is 3 nodes. Default: |
|
Whether or not to retain the database records of related entities during removal. Choices:
|
|
CIDR range from which to assign IPs to pods in the Kubernetes cluster Must be a valid CIDR block (e.g., “10.200.0.0/16”) |
|
Flag to specify if a private K8s cluster should be created. Choices:
|
|
If provided, the Cloudera on cloud API will use this value as its private key. If not provided, the API will attempt to use the value from the environment variable Required if |
|
If provided, the Cloudera on cloud API will use this value as its profile. If not provided, the API will attempt to use the value from the environment variable Default: |
|
Indicates whether or not to use a public load balancer when deploying dependencies stack. Choices:
|
|
CIDR range from which to assign IPs to internal services in the Kubernetes cluster Must be a valid CIDR block (e.g., “10.201.0.0/16”) |
|
Indicates whether to skip pre-flight checks during service enablement Use with caution - skipping checks may result in deployment failures Choices:
|
|
The declarative state of the Dataflow Service Choices:
|
|
Legacy CDPy SDK error handling. Choices:
|
|
Tags to apply to the DataFlow Service |
|
Whether or not to terminate all deployments associated with this DataFlow service Choices:
|
|
The internal polling timeout (in seconds) while the module waits for the Dataflow Service to achieve the declared state. Default: |
|
Indicates whether User Defined Routing (UDR) mode is enabled for AKS clusters Azure-specific option for controlling network routing behavior Choices:
|
|
Flag to enable internal polling to wait for the Dataflow Service to achieve the declared state. If set to FALSE, the module will return immediately. Choices:
|
Notes
Note
This feature this module is for is in Technical Preview
When updating an existing service, only the following parameters can be changed: nodes_min/nodes_max (both required together), k8s_ip_ranges, loadbalancer_ip_ranges, skip_preflight_checks
Network configuration (subnets, pod_cidr, service_cidr, cluster type) cannot be updated after creation
To change immutable parameters, you must disable and recreate the service
When state=absent and force=true, if service is in NOT_ENABLED state, resetService API is used
resetService only works on NOT_ENABLED services and does not clean up cloud resources
Use force=true with caution as manual resource cleanup may be required
Examples
# Note: These examples do not set authentication details.
- cloudera.cloud.df_service:
name: my-service
nodes_min: 3
nodes_max: 10
public_loadbalancer: true
cluster_subnets_filter: "[?contains(subnetName, 'pvt-0')]"
loadbalancer_subnets_filter: "[?contains(subnetName, 'pub')]"
state: present
wait: true
- cloudera.cloud.df_service:
name: my-service
nodes_min: 3
nodes_max: 10
public_loadbalancer: true
cluster_subnets_filter: "pvt-0"
loadbalancer_subnets_filter: "pub"
state: present
wait: true
- cloudera.cloud.df_service:
name: my-service
nodes_min: 3
nodes_max: 10
public_loadbalancer: true
cluster_subnets_filter: "availabilityZone == 'us-east-1a'"
loadbalancer_subnets_filter: "availabilityZone == 'us-east-1b'"
state: present
wait: true
# Remove a Dataflow Service with Async wait
- cloudera.cloud.df_service:
name: my-service
persist: false
state: absent
wait: true
async: 3600
poll: 0
register: __my_teardown_request
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Returns the captured CDP SDK log. Returned: when supported |
|
Returns a list of each line of the captured CDP SDK log. Returned: when supported |
|
The information about the named DataFlow Service or DataFlow Services Returned: always |
|
Current count of active alerts classified as an error. Returned: always |
|
Current count of active alerts classified as a warning. Returned: always |
|
The authorized IP Ranges. Returned: always |
|
The cloud platform of the environment. Returned: always |
|
Cluster id of the environment. Returned: if enabled |
|
The DataFlow Service’s parent environment CRN. Returned: always |
|
The deployment count. Returned: always |
|
The URL of the environment local DataFlow application. Returned: always |
|
The instance type of the kubernetes nodes currently in use by DataFlow for this environment. Returned: always |
|
The number of kubernetes nodes currently in use by DataFlow for this environment. Returned: always |
|
The maximum number of kubernetes nodes that environment may scale up under high-demand situations. Returned: always |
|
The minimum number of Kubernetes nodes that need to be provisioned in the environment. Returned: always |
|
The DataFlow Service’s parent environment name. Returned: always |
|
The region of the environment. Returned: always |
|
The status of a DataFlow enabled environment. Returned: always |
|
A status message for the environment. Returned: always |
|
The state of the environment. Returned: always |