Skip to content

Commit ee1e353

Browse files
authored
Add inbound_hostname and listen_components to df deployment (#176)
Signed-off-by: Jim Enright <[email protected]>
1 parent 8402cda commit ee1e353

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

plugins/modules/df_deployment.py

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/python
22
# -*- coding: utf-8 -*-
33

4-
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
4+
# Copyright 2025 Cloudera, Inc. All Rights Reserved.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
# TODO: Update docs
1918
DOCUMENTATION = r"""
2019
module: df_deployment
2120
short_description: Enable or Disable CDP DataFlow Deployments
@@ -134,6 +133,16 @@
134133
- Definitions of KPIs to apply to the Deployed Flow
135134
type: list
136135
required: False
136+
inbound_hostname:
137+
description:
138+
- Fully qualified domain name (FQDN) for the inbound host where the DataFlow Service accepts incoming connections
139+
type: str
140+
required: False
141+
listen_components:
142+
description:
143+
- List of ports and protocols through which the DataFlow Service accepts incoming connections
144+
type: list
145+
required: False
137146
delay:
138147
description:
139148
- The internal polling interval (in seconds) while the module waits for the Dataflow Service to achieve the
@@ -166,6 +175,31 @@
166175
- cloudera.cloud.df_deployment:
167176
name: my-flow
168177
178+
# Deploy a Dataflow with specific Flow and Version and accepting inbound connection
179+
- cloudera.cloud.df_deployment:
180+
name: my-flow
181+
flow_name: exmple-kafka-flow-definition
182+
nifi_ver: "2.3.0.4.3.2.0-89"
183+
parameter_groups:
184+
- name: "parameters"
185+
parameters:
186+
- name: "brokers"
187+
value: "edge-data-kafka-brokers:9091"
188+
assetReferences: []
189+
- name: "topic"
190+
value: "my-kafka-topic"
191+
assetReferences: []
192+
- name: "workload.password"
193+
value: "example-password"
194+
assetReferences: []
195+
- name: "workload.user"
196+
value: "example-user"
197+
assetReferences: []
198+
inbound_hostname: "receivetxn.inbound.example.com"
199+
listen_components:
200+
- protocol: "TCP"
201+
port: "10001"
202+
169203
# Remove a Dataflow Service with Async wait
170204
- cloudera.cloud.df_deployment:
171205
name: my-flow-name
@@ -349,6 +383,8 @@ def __init__(self, module):
349383
self.autostart_flow = self._get_param("autostart_flow")
350384
self.parameter_groups = self._get_param("parameter_groups")
351385
self.kpis = self._get_param("kpis")
386+
self.inbound_hostname = self._get_param("inbound_hostname")
387+
self.listen_components = self._get_param("listen_components")
352388

353389
self.state = self._get_param("state")
354390
self.wait = self._get_param("wait")
@@ -461,6 +497,8 @@ def _create_deployment(self):
461497
autostart_flow=self.autostart_flow,
462498
parameter_groups=self.parameter_groups,
463499
kpis=self.kpis,
500+
inbound_hostname=self.inbound_hostname,
501+
listen_components=self.listen_components,
464502
)
465503
self.changed = True
466504

@@ -519,6 +557,8 @@ def main():
519557
autostart_flow=dict(type="bool", default=True),
520558
parameter_groups=dict(type="list", default=None),
521559
kpis=dict(type="list", default=None),
560+
inbound_hostname=dict(type="str", default=None),
561+
listen_components=dict(type="list", default=None),
522562
state=dict(type="str", choices=["present", "absent"], default="present"),
523563
wait=dict(type="bool", default=True),
524564
delay=dict(type="int", aliases=["polling_delay"], default=15),

0 commit comments

Comments
 (0)