Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Make forwarding rule service_label and service_name GA (#221)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and rambleraptor committed Sep 5, 2019
1 parent 943aee3 commit ba89a73
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
34 changes: 34 additions & 0 deletions plugins/modules/gcp_compute_forwarding_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'),
)
)
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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'),
}


Expand Down
18 changes: 18 additions & 0 deletions plugins/modules/gcp_compute_forwarding_rule_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ba89a73

Please sign in to comment.