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 f7840a0990293f..7813b2b8802584 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py @@ -206,6 +206,18 @@ choices: - PREMIUM - STANDARD + service_label: + description: + - An optional prefix to the service name for this Forwarding Rule. + - If specified, will be the first label of the fully qualified service name. + - The label must be 1-63 characters long, and comply with RFC1035. + - Specifically, the label must be 1-63 characters long and match the regular expression + `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase + letter, and all following characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + - This field is only used for internal load balancing. + required: false + version_added: 2.8 region: description: - A reference to the region where the regional forwarding rule resides. @@ -396,6 +408,24 @@ to be PREMIUM.' returned: success type: str +serviceLabel: + description: + - An optional prefix to the service name for this Forwarding Rule. + - If specified, will be the first label of the fully qualified service name. + - The label must be 1-63 characters long, and comply with RFC1035. + - Specifically, the label must be 1-63 characters long and match the regular expression + `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase + letter, and all following characters must be a dash, lowercase letter, or digit, + except the last character, which cannot be a dash. + - This field is only used for internal load balancing. + returned: success + type: str +serviceName: + description: + - The internal fully qualified service name for this Forwarding Rule. + - This field is only used for internal load balancing. + returned: success + type: str region: description: - A reference to the region where the regional forwarding rule resides. @@ -437,6 +467,7 @@ def main(): target=dict(), all_ports=dict(type='bool'), network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']), + service_label=dict(type='str'), region=dict(required=True, type='str'), ) ) @@ -517,6 +548,7 @@ def resource_to_request(module): 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'), + u'serviceLabel': module.params.get('service_label'), } return_vals = {} for k, v in request.items(): @@ -598,6 +630,8 @@ def response_to_hash(module, response): u'target': response.get(u'target'), u'allPorts': response.get(u'allPorts'), u'networkTier': module.params.get('network_tier'), + u'serviceLabel': response.get(u'serviceLabel'), + u'serviceName': response.get(u'serviceName'), } 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 7481e517a4cb41..d0dce15b518a67 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 @@ -216,6 +216,24 @@ it is assumed to be PREMIUM.' returned: success type: str + serviceLabel: + description: + - An optional prefix to the service name for this Forwarding Rule. + - If specified, will be the first label of the fully qualified service name. + - The label must be 1-63 characters long, and comply with RFC1035. + - Specifically, the label must be 1-63 characters long and match the regular + expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must + be a lowercase letter, and all following characters must be a dash, lowercase + letter, or digit, except the last character, which cannot be a dash. + - This field is only used for internal load balancing. + returned: success + type: str + serviceName: + description: + - The internal fully qualified service name for this Forwarding Rule. + - This field is only used for internal load balancing. + returned: success + type: str region: description: - A reference to the region where the regional forwarding rule resides.