From 1d315b16022a5dfe44c0fcc83bdd18810065e744 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 25 Mar 2019 10:18:42 -0700 Subject: [PATCH] Mark Forwarding Rule allPorts as GA (#219) /cc @rileykarson --- .../google/gcp_compute_forwarding_rule.py | 18 ++++++++++++++++++ .../gcp_compute_forwarding_rule_facts.py | 7 +++++++ 2 files changed, 25 insertions(+) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py index c9eef469c499a0..f7840a0990293f 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py @@ -188,6 +188,14 @@ task and then set this target field to "{{ name-of-resource }}"' required: false version_added: 2.7 + all_ports: + description: + - When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` + and specify this field as `true` to allow packets addressed to any ports to + be forwarded to the backends configured with this forwarding rule. + required: false + type: bool + version_added: 2.8 network_tier: description: - 'The networking tier used for configuring this address. This field can take @@ -374,6 +382,13 @@ - This field is not used for internal load balancing. returned: success type: str +allPorts: + description: + - When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` + and specify this field as `true` to allow packets addressed to any ports to be + forwarded to the backends configured with this forwarding rule. + returned: success + type: bool networkTier: description: - 'The networking tier used for configuring this address. This field can take the @@ -420,6 +435,7 @@ def main(): ports=dict(type='list', elements='str'), subnetwork=dict(), target=dict(), + all_ports=dict(type='bool'), network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']), region=dict(required=True, type='str'), ) @@ -499,6 +515,7 @@ def resource_to_request(module): u'ports': module.params.get('ports'), u'subnetwork': replace_resource_dict(module.params.get(u'subnetwork', {}), 'selfLink'), u'target': replace_resource_dict(module.params.get(u'target', {}), 'selfLink'), + u'allPorts': module.params.get('all_ports'), u'networkTier': module.params.get('network_tier'), } return_vals = {} @@ -579,6 +596,7 @@ def response_to_hash(module, response): u'ports': response.get(u'ports'), u'subnetwork': response.get(u'subnetwork'), u'target': response.get(u'target'), + u'allPorts': response.get(u'allPorts'), u'networkTier': module.params.get('network_tier'), } diff --git a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py index 15cef1e1cea8ed..7481e517a4cb41 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py @@ -202,6 +202,13 @@ - This field is not used for internal load balancing. returned: success type: str + allPorts: + description: + - When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` + and specify this field as `true` to allow packets addressed to any ports to + be forwarded to the backends configured with this forwarding rule. + returned: success + type: bool networkTier: description: - 'The networking tier used for configuring this address. This field can take