Better resourceref flexibility (#149)

<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
This commit is contained in:
The Magician 2018-12-14 13:00:18 -08:00 committed by Alex Stephen
parent 3496923252
commit 982933cfe8
64 changed files with 569 additions and 526 deletions

View file

@ -70,8 +70,7 @@ def replace_resource_dict(item, value):
new_item = ast.literal_eval(item) new_item = ast.literal_eval(item)
return replace_resource_dict(new_item, value) return replace_resource_dict(new_item, value)
except ValueError: except ValueError:
return item return new_item
# Handles all authentication and HTTP sessions for GCP API calls. # Handles all authentication and HTTP sessions for GCP API calls.
class GcpSession(object): class GcpSession(object):
@ -225,12 +224,16 @@ class GcpModule(AnsibleModule):
return new return new
# This class takes in two dictionaries `a` and `b`. # This class does difference checking according to a set of GCP-specific rules.
# These are dictionaries of arbitrary depth, but made up of standard Python # This will be primarily used for checking dictionaries.
# types only. # In an equivalence check, the left-hand dictionary will be the request and
# This differ will compare all values in `a` to those in `b`. # the right-hand side will be the response.
# Note: Only keys in `a` will be compared. Extra keys in `b` will be ignored.
# Note: On all lists, order does matter. # Rules:
# Extra keys in response will be ignored.
# Ordering of lists does not matter.
# - exception: lists of dictionaries are
# assumed to be in sorted order.
class GcpRequest(object): class GcpRequest(object):
def __init__(self, request): def __init__(self, request):
self.request = request self.request = request
@ -241,31 +244,48 @@ class GcpRequest(object):
def __ne__(self, other): def __ne__(self, other):
return not self.__eq__(other) return not self.__eq__(other)
# Returns the difference between `self.request` and `b` # Returns the difference between a request + response.
def difference(self, b): # While this is used under the hood for __eq__ and __ne__,
return self._compare_dicts(self.request, b.request) # it is useful for debugging.
def difference(self, response):
return self._compare_value(self.request, response.request)
def _compare_dicts(self, dict1, dict2): def _compare_dicts(self, req_dict, resp_dict):
difference = {} difference = {}
for key in dict1: for key in req_dict:
difference[key] = self._compare_value(dict1.get(key), dict2.get(key)) if resp_dict.get(key):
difference[key] = self._compare_value(req_dict.get(key), resp_dict.get(key))
# Remove all empty values from difference. # Remove all empty values from difference.
difference2 = {} sanitized_difference = {}
for key in difference: for key in difference:
if difference[key]: if difference[key]:
difference2[key] = difference[key] sanitized_difference[key] = difference[key]
return difference2 return sanitized_difference
# Takes in two lists and compares them. # Takes in two lists and compares them.
def _compare_lists(self, list1, list2): # All things in the list should be identical (even if a dictionary)
def _compare_lists(self, req_list, resp_list):
# Have to convert each thing over to unicode.
# Python doesn't handle equality checks between unicode + non-unicode well.
difference = [] difference = []
for index in range(len(list1)): new_req_list = self._convert_value(req_list)
value1 = list1[index] new_resp_list = self._convert_value(resp_list)
if index < len(list2):
value2 = list2[index] # We have to compare each thing in the request to every other thing
difference.append(self._compare_value(value1, value2)) # in the response.
# This is because the request value will be a subset of the response value.
# The assumption is that these lists will be small enough that it won't
# be a performance burden.
for req_item in new_req_list:
found_item = False
for resp_item in new_resp_list:
# Looking for a None value here.
if not self._compare_value(req_item, resp_item):
found_item = True
if not found_item:
difference.append(req_item)
difference2 = [] difference2 = []
for value in difference: for value in difference:
@ -274,25 +294,69 @@ class GcpRequest(object):
return difference2 return difference2
def _compare_value(self, value1, value2): # Compare two values of arbitrary types.
def _compare_value(self, req_value, resp_value):
diff = None diff = None
# If a None is found, a difference does not exist. # If a None is found, a difference does not exist.
# Only differing values matter. # Only differing values matter.
if not value2: if not resp_value:
return None return None
# Can assume non-None types at this point. # Can assume non-None types at this point.
try: try:
if isinstance(value1, list): if isinstance(req_value, list):
diff = self._compare_lists(value1, value2) diff = self._compare_lists(req_value, resp_value)
elif isinstance(value2, dict): elif isinstance(req_value, dict):
diff = self._compare_dicts(value1, value2) diff = self._compare_dicts(req_value, resp_value)
elif isinstance(req_value, bool):
diff = self._compare_boolean(req_value, resp_value)
# Always use to_text values to avoid unicode issues. # Always use to_text values to avoid unicode issues.
elif to_text(value1) != to_text(value2): elif to_text(req_value) != to_text(resp_value):
diff = value1 diff = req_value
# to_text may throw UnicodeErrors. # to_text may throw UnicodeErrors.
# These errors shouldn't crash Ansible and should be hidden. # These errors shouldn't crash Ansible and should be hidden.
except UnicodeError: except UnicodeError:
pass pass
return diff return diff
# Compare two boolean values.
def _compare_boolean(self, req_value, resp_value):
try:
# Both True
if req_value and isinstance(resp_value, bool) and resp_value:
return None
# Value1 True, resp_value 'true'
elif req_value and to_text(resp_value) == 'true':
return None
# Both False
elif not req_value and isinstance(resp_value, bool) and not resp_value:
return None
# Value1 False, resp_value 'false'
elif not req_value and to_text(resp_value) == 'false':
return None
else:
return resp_value
# to_text may throw UnicodeErrors.
# These errors shouldn't crash Ansible and should be hidden.
except UnicodeError:
return None
# Python (2 esp.) doesn't do comparisons between unicode + non-unicode well.
# This leads to a lot of false positives when diffing values.
# The Ansible to_text() function is meant to get all strings
# into a standard format.
def _convert_value(self, value):
if isinstance(value, list):
new_list = []
for item in value:
new_list.append(self._convert_value(item))
return new_list
elif isinstance(value, dict):
new_dict = {}
for key in value:
new_dict[key] = self._convert_value(value[key])
return new_dict
else:
return to_text(value)

View file

@ -101,10 +101,9 @@ options:
- This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER - This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER
purposes. purposes.
- 'This field represents a link to a Subnetwork resource in GCP. It can be specified - 'This field represents a link to a Subnetwork resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_subnetwork in two ways. First, you can place in the selfLink of the resource here as a
task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork
you can set this subnetwork to a dictionary with the selfLink key where the task and then set this subnetwork field to "{{ name-of-resource }}"'
value is the selfLink of your Subnetwork'
required: false required: false
version_added: 2.7 version_added: 2.7
region: region:
@ -182,7 +181,7 @@ subnetwork:
- This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER - This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER
purposes. purposes.
returned: success returned: success
type: dict type: str
users: users:
description: description:
- The URLs of the resources that are using this address. - The URLs of the resources that are using this address.
@ -220,8 +219,8 @@ def main():
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']), network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']),
subnetwork=dict(type='dict'), subnetwork=dict(),
region=dict(required=True, type='str'), region=dict(required=True, type='str')
) )
) )

View file

@ -121,7 +121,7 @@ items:
- This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER - This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER
purposes. purposes.
returned: success returned: success
type: dict type: str
users: users:
description: description:
- The URLs of the resources that are using this address. - The URLs of the resources that are using this address.

View file

@ -96,10 +96,10 @@ options:
- When the BackendService has load balancing scheme INTERNAL, the instance - When the BackendService has load balancing scheme INTERNAL, the instance
group must be in a zone within the same region as the BackendService. group must be in a zone within the same region as the BackendService.
- 'This field represents a link to a InstanceGroup resource in GCP. It can - 'This field represents a link to a InstanceGroup resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a be specified in two ways. First, you can place in the selfLink of the resource
gcp_compute_instance_group task and then set this group field to "{{ name-of-resource here as a string Alternatively, you can add `register: name-of-resource`
}}" Alternatively, you can set this group to a dictionary with the selfLink to a gcp_compute_instance_group task and then set this group field to "{{
key where the value is the selfLink of your InstanceGroup' name-of-resource }}"'
required: false required: false
max_connections: max_connections:
description: description:
@ -389,7 +389,7 @@ backends:
- When the BackendService has load balancing scheme INTERNAL, the instance group - When the BackendService has load balancing scheme INTERNAL, the instance group
must be in a zone within the same region as the BackendService. must be in a zone within the same region as the BackendService.
returned: success returned: success
type: dict type: str
maxConnections: maxConnections:
description: description:
- The max number of simultaneous connections for the group. Can be used with - The max number of simultaneous connections for the group. Can be used with
@ -623,38 +623,29 @@ def main():
argument_spec=dict( argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
affinity_cookie_ttl_sec=dict(type='int'), affinity_cookie_ttl_sec=dict(type='int'),
backends=dict( backends=dict(type='list', elements='dict', options=dict(
type='list', balancing_mode=dict(type='str', choices=['UTILIZATION', 'RATE', 'CONNECTION']),
elements='dict', capacity_scaler=dict(type='str'),
options=dict( description=dict(type='str'),
balancing_mode=dict(default='UTILIZATION', type='str', choices=['UTILIZATION', 'RATE', 'CONNECTION']), group=dict(),
capacity_scaler=dict(default=1.0, type='str'), max_connections=dict(type='int'),
description=dict(type='str'), max_connections_per_instance=dict(type='int'),
group=dict(type='str'), max_rate=dict(type='int'),
max_connections=dict(type='int'), max_rate_per_instance=dict(type='str'),
max_connections_per_instance=dict(type='int'), max_utilization=dict(type='str')
max_rate=dict(type='int'), )),
max_rate_per_instance=dict(type='str'), cdn_policy=dict(type='dict', options=dict(
max_utilization=dict(default=0.8, type='str'), cache_key_policy=dict(type='dict', options=dict(
), include_host=dict(type='bool'),
), include_protocol=dict(type='bool'),
cdn_policy=dict( include_query_string=dict(type='bool'),
type='dict', query_string_blacklist=dict(type='list', elements='str'),
options=dict( query_string_whitelist=dict(type='list', elements='str')
cache_key_policy=dict( ))
type='dict', )),
options=dict( connection_draining=dict(type='dict', options=dict(
include_host=dict(type='bool'), draining_timeout_sec=dict(type='int')
include_protocol=dict(type='bool'), )),
include_query_string=dict(type='bool'),
query_string_blacklist=dict(type='list', elements='str'),
query_string_whitelist=dict(type='list', elements='str'),
),
),
signed_url_cache_max_age_sec=dict(default=3600, type='int'),
),
),
connection_draining=dict(type='dict', options=dict(draining_timeout_sec=dict(default=300, type='int'))),
description=dict(type='str'), description=dict(type='str'),
enable_cdn=dict(type='bool'), enable_cdn=dict(type='bool'),
health_checks=dict(required=True, type='list', elements='str'), health_checks=dict(required=True, type='list', elements='str'),

View file

@ -114,7 +114,7 @@ items:
- When the BackendService has load balancing scheme INTERNAL, the instance - When the BackendService has load balancing scheme INTERNAL, the instance
group must be in a zone within the same region as the BackendService. group must be in a zone within the same region as the BackendService.
returned: success returned: success
type: dict type: str
maxConnections: maxConnections:
description: description:
- The max number of simultaneous connections for the group. Can be used - The max number of simultaneous connections for the group. Can be used

View file

@ -156,10 +156,9 @@ options:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource. or full URL to the resource.
- 'This field represents a link to a Snapshot resource in GCP. It can be specified - 'This field represents a link to a Snapshot resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_snapshot in two ways. First, you can place in the selfLink of the resource here as a
task and then set this source_snapshot field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_snapshot
you can set this source_snapshot to a dictionary with the selfLink key where task and then set this source_snapshot field to "{{ name-of-resource }}"'
the value is the selfLink of your Snapshot'
required: false required: false
source_snapshot_encryption_key: source_snapshot_encryption_key:
description: description:
@ -350,7 +349,7 @@ sourceSnapshot:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource. or full URL to the resource.
returned: success returned: success
type: dict type: str
sourceSnapshotEncryptionKey: sourceSnapshotEncryptionKey:
description: description:
- The customer-supplied encryption key of the source snapshot. Required if the source - The customer-supplied encryption key of the source snapshot. Required if the source
@ -410,10 +409,19 @@ def main():
type=dict(type='str'), type=dict(type='str'),
source_image=dict(type='str'), source_image=dict(type='str'),
zone=dict(required=True, type='str'), zone=dict(required=True, type='str'),
source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'))), source_image_encryption_key=dict(type='dict', options=dict(
disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'))), raw_key=dict(type='str'),
source_snapshot=dict(type='dict'), sha256=dict(type='str')
source_snapshot_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'))), )),
disk_encryption_key=dict(type='dict', options=dict(
raw_key=dict(type='str'),
sha256=dict(type='str')
)),
source_snapshot=dict(),
source_snapshot_encryption_key=dict(type='dict', options=dict(
raw_key=dict(type='str'),
sha256=dict(type='str')
))
) )
) )

View file

@ -223,7 +223,7 @@ items:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource. or full URL to the resource.
returned: success returned: success
type: dict type: str
sourceSnapshotEncryptionKey: sourceSnapshotEncryptionKey:
description: description:
- The customer-supplied encryption key of the source snapshot. Required if the - The customer-supplied encryption key of the source snapshot. Required if the

View file

@ -146,10 +146,9 @@ options:
networks/my-network projects/myproject/global/networks/my-network global/networks/default networks/my-network projects/myproject/global/networks/my-network global/networks/default
.' .'
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: false required: false
default: default:
selfLink: global/networks/default selfLink: global/networks/default
@ -342,7 +341,7 @@ network:
networks/my-network projects/myproject/global/networks/my-network global/networks/default networks/my-network projects/myproject/global/networks/my-network global/networks/default
.' .'
returned: success returned: success
type: dict type: str
priority: priority:
description: description:
- Priority for this rule. This is an integer between 0 and 65535, both inclusive. - Priority for this rule. This is an integer between 0 and 65535, both inclusive.
@ -440,7 +439,7 @@ def main():
direction=dict(type='str', choices=['INGRESS', 'EGRESS']), direction=dict(type='str', choices=['INGRESS', 'EGRESS']),
disabled=dict(type='bool'), disabled=dict(type='bool'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
network=dict(default={'selfLink': 'global/networks/default'}, type='dict'), network=dict(default={'selfLink': 'global/networks/default'}),
priority=dict(default=1000, type='int'), priority=dict(default=1000, type='int'),
source_ranges=dict(type='list', elements='str'), source_ranges=dict(type='list', elements='str'),
source_service_accounts=dict(type='list', elements='str'), source_service_accounts=dict(type='list', elements='str'),

View file

@ -169,7 +169,7 @@ items:
networks/my-network projects/myproject/global/networks/my-network global/networks/default networks/my-network projects/myproject/global/networks/my-network global/networks/default
.' .'
returned: success returned: success
type: dict type: str
priority: priority:
description: description:
- Priority for this rule. This is an integer between 0 and 65535, both inclusive. - Priority for this rule. This is an integer between 0 and 65535, both inclusive.

View file

@ -95,10 +95,10 @@ options:
- This is used for internal load balancing. - This is used for internal load balancing.
- "(not used for external load balancing) ." - "(not used for external load balancing) ."
- 'This field represents a link to a BackendService resource in GCP. It can be - 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service specified in two ways. First, you can place in the selfLink of the resource
task and then set this backend_service field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource` to
you can set this backend_service to a dictionary with the selfLink key where a gcp_compute_backend_service task and then set this backend_service field to
the value is the selfLink of your BackendService' "{{ name-of-resource }}"'
required: false required: false
ip_version: ip_version:
description: description:
@ -135,10 +135,9 @@ options:
specified, the default network will be used. specified, the default network will be used.
- This field is not used for external load balancing. - This field is not used for external load balancing.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: false required: false
port_range: port_range:
description: description:
@ -171,10 +170,9 @@ options:
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing. - This field is not used for external load balancing.
- 'This field represents a link to a Subnetwork resource in GCP. It can be specified - 'This field represents a link to a Subnetwork resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_subnetwork in two ways. First, you can place in the selfLink of the resource here as a
task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork
you can set this subnetwork to a dictionary with the selfLink key where the task and then set this subnetwork field to "{{ name-of-resource }}"'
value is the selfLink of your Subnetwork'
required: false required: false
target: target:
description: description:
@ -185,10 +183,9 @@ options:
target object. target object.
- This field is not used for internal load balancing. - This field is not used for internal load balancing.
- 'This field represents a link to a TargetPool resource in GCP. It can be specified - 'This field represents a link to a TargetPool resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_target_pool in two ways. First, you can place in the selfLink of the resource here as a
task and then set this target field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_target_pool
you can set this target to a dictionary with the selfLink key where the value task and then set this target field to "{{ name-of-resource }}"'
is the selfLink of your TargetPool'
required: false required: false
version_added: 2.7 version_added: 2.7
network_tier: network_tier:
@ -300,7 +297,7 @@ backendService:
- This is used for internal load balancing. - This is used for internal load balancing.
- "(not used for external load balancing) ." - "(not used for external load balancing) ."
returned: success returned: success
type: dict type: str
ipVersion: ipVersion:
description: description:
- The IP Version that will be used by this forwarding rule. Valid options are IPV4 - The IP Version that will be used by this forwarding rule. Valid options are IPV4
@ -333,7 +330,7 @@ network:
the default network will be used. the default network will be used.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
portRange: portRange:
description: description:
- This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy,
@ -366,7 +363,7 @@ subnetwork:
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
target: target:
description: description:
- A reference to a TargetPool resource to receive the matched traffic. - A reference to a TargetPool resource to receive the matched traffic.
@ -376,7 +373,7 @@ target:
target object. target object.
- This field is not used for internal load balancing. - This field is not used for internal load balancing.
returned: success returned: success
type: dict type: str
networkTier: networkTier:
description: description:
- 'The networking tier used for configuring this address. This field can take the - 'The networking tier used for configuring this address. This field can take the
@ -414,15 +411,15 @@ def main():
description=dict(type='str'), description=dict(type='str'),
ip_address=dict(type='str'), ip_address=dict(type='str'),
ip_protocol=dict(type='str', choices=['TCP', 'UDP', 'ESP', 'AH', 'SCTP', 'ICMP']), ip_protocol=dict(type='str', choices=['TCP', 'UDP', 'ESP', 'AH', 'SCTP', 'ICMP']),
backend_service=dict(type='dict'), backend_service=dict(),
ip_version=dict(type='str', choices=['IPV4', 'IPV6']), ip_version=dict(type='str', choices=['IPV4', 'IPV6']),
load_balancing_scheme=dict(type='str', choices=['INTERNAL', 'EXTERNAL']), load_balancing_scheme=dict(type='str', choices=['INTERNAL', 'EXTERNAL']),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
network=dict(type='dict'), network=dict(),
port_range=dict(type='str'), port_range=dict(type='str'),
ports=dict(type='list', elements='str'), ports=dict(type='list', elements='str'),
subnetwork=dict(type='dict'), subnetwork=dict(),
target=dict(type='dict'), target=dict(),
network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']), network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']),
region=dict(required=True, type='str') region=dict(required=True, type='str')
) )

View file

@ -122,7 +122,7 @@ items:
- This is used for internal load balancing. - This is used for internal load balancing.
- "(not used for external load balancing) ." - "(not used for external load balancing) ."
returned: success returned: success
type: dict type: str
ipVersion: ipVersion:
description: description:
- The IP Version that will be used by this forwarding rule. Valid options are - The IP Version that will be used by this forwarding rule. Valid options are
@ -155,7 +155,7 @@ items:
specified, the default network will be used. specified, the default network will be used.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
portRange: portRange:
description: description:
- This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy,
@ -190,7 +190,7 @@ items:
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
target: target:
description: description:
- A reference to a TargetPool resource to receive the matched traffic. - A reference to a TargetPool resource to receive the matched traffic.
@ -200,7 +200,7 @@ items:
to the target object. to the target object.
- This field is not used for internal load balancing. - This field is not used for internal load balancing.
returned: success returned: success
type: dict type: str
networkTier: networkTier:
description: description:
- 'The networking tier used for configuring this address. This field can take - 'The networking tier used for configuring this address. This field can take

View file

@ -97,10 +97,10 @@ options:
- This is used for internal load balancing. - This is used for internal load balancing.
- "(not used for external load balancing) ." - "(not used for external load balancing) ."
- 'This field represents a link to a BackendService resource in GCP. It can be - 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service specified in two ways. First, you can place in the selfLink of the resource
task and then set this backend_service field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource` to
you can set this backend_service to a dictionary with the selfLink key where a gcp_compute_backend_service task and then set this backend_service field to
the value is the selfLink of your BackendService' "{{ name-of-resource }}"'
required: false required: false
ip_version: ip_version:
description: description:
@ -137,10 +137,9 @@ options:
specified, the default network will be used. specified, the default network will be used.
- This field is not used for external load balancing. - This field is not used for external load balancing.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: false required: false
port_range: port_range:
description: description:
@ -173,10 +172,9 @@ options:
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing. - This field is not used for external load balancing.
- 'This field represents a link to a Subnetwork resource in GCP. It can be specified - 'This field represents a link to a Subnetwork resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_subnetwork in two ways. First, you can place in the selfLink of the resource here as a
task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork
you can set this subnetwork to a dictionary with the selfLink key where the task and then set this subnetwork field to "{{ name-of-resource }}"'
value is the selfLink of your Subnetwork'
required: false required: false
target: target:
description: description:
@ -320,7 +318,7 @@ backendService:
- This is used for internal load balancing. - This is used for internal load balancing.
- "(not used for external load balancing) ." - "(not used for external load balancing) ."
returned: success returned: success
type: dict type: str
ipVersion: ipVersion:
description: description:
- The IP Version that will be used by this forwarding rule. Valid options are IPV4 - The IP Version that will be used by this forwarding rule. Valid options are IPV4
@ -353,7 +351,7 @@ network:
the default network will be used. the default network will be used.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
portRange: portRange:
description: description:
- This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy,
@ -386,7 +384,7 @@ subnetwork:
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
region: region:
description: description:
- A reference to the region where the regional forwarding rule resides. - A reference to the region where the regional forwarding rule resides.
@ -424,12 +422,15 @@ def main():
description=dict(type='str'), description=dict(type='str'),
ip_address=dict(type='str'), ip_address=dict(type='str'),
ip_protocol=dict(type='str', choices=['TCP', 'UDP', 'ESP', 'AH', 'SCTP', 'ICMP']), ip_protocol=dict(type='str', choices=['TCP', 'UDP', 'ESP', 'AH', 'SCTP', 'ICMP']),
backend_service=dict(),
ip_version=dict(type='str', choices=['IPV4', 'IPV6']), ip_version=dict(type='str', choices=['IPV4', 'IPV6']),
load_balancing_scheme=dict(type='str', choices=['INTERNAL_SELF_MANAGED', 'EXTERNAL']), load_balancing_scheme=dict(type='str', choices=['INTERNAL_SELF_MANAGED', 'EXTERNAL']),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
network=dict(type='dict'), network=dict(),
port_range=dict(type='str'), port_range=dict(type='str'),
target=dict(required=True, type='str'), ports=dict(type='list', elements='str'),
subnetwork=dict(),
target=dict(type='str')
) )
) )

View file

@ -116,7 +116,7 @@ items:
- This is used for internal load balancing. - This is used for internal load balancing.
- "(not used for external load balancing) ." - "(not used for external load balancing) ."
returned: success returned: success
type: dict type: str
ipVersion: ipVersion:
description: description:
- The IP Version that will be used by this forwarding rule. Valid options are - The IP Version that will be used by this forwarding rule. Valid options are
@ -149,7 +149,7 @@ items:
specified, the default network will be used. specified, the default network will be used.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
portRange: portRange:
description: description:
- This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy,
@ -184,7 +184,7 @@ items:
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing. - This field is not used for external load balancing.
returned: success returned: success
type: dict type: str
region: region:
description: description:
- A reference to the region where the regional forwarding rule resides. - A reference to the region where the regional forwarding rule resides.

View file

@ -152,10 +152,9 @@ options:
- Refers to a gcompute_disk object You must provide either this property or the - Refers to a gcompute_disk object You must provide either this property or the
rawDisk.source property but not both to create an image. rawDisk.source property but not both to create an image.
- 'This field represents a link to a Disk resource in GCP. It can be specified - 'This field represents a link to a Disk resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_disk in two ways. First, you can place in the selfLink of the resource here as a
task and then set this source_disk field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_disk
you can set this source_disk to a dictionary with the selfLink key where the task and then set this source_disk field to "{{ name-of-resource }}"'
value is the selfLink of your Disk'
required: false required: false
source_disk_encryption_key: source_disk_encryption_key:
description: description:
@ -377,7 +376,7 @@ sourceDisk:
- Refers to a gcompute_disk object You must provide either this property or the - Refers to a gcompute_disk object You must provide either this property or the
rawDisk.source property but not both to create an image. rawDisk.source property but not both to create an image.
returned: success returned: success
type: dict type: str
sourceDiskEncryptionKey: sourceDiskEncryptionKey:
description: description:
- The customer-supplied encryption key of the source disk. Required if the source - The customer-supplied encryption key of the source disk. Required if the source
@ -440,12 +439,16 @@ def main():
labels=dict(type='dict'), labels=dict(type='dict'),
licenses=dict(type='list', elements='str'), licenses=dict(type='list', elements='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
raw_disk=dict( raw_disk=dict(type='dict', options=dict(
type='dict', container_type=dict(type='str', choices=['TAR']),
options=dict(container_type=dict(type='str', choices=['TAR']), sha1_checksum=dict(type='str'), source=dict(required=True, type='str')), sha1_checksum=dict(type='str'),
), source=dict(type='str')
source_disk=dict(type='dict'), )),
source_disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))), source_disk=dict(),
source_disk_encryption_key=dict(type='dict', options=dict(
raw_key=dict(type='str'),
sha256=dict(type='str')
)),
source_disk_id=dict(type='str'), source_disk_id=dict(type='str'),
source_type=dict(type='str', choices=['RAW']), source_type=dict(type='str', choices=['RAW']),
) )

View file

@ -231,7 +231,7 @@ items:
- Refers to a gcompute_disk object You must provide either this property or - Refers to a gcompute_disk object You must provide either this property or
the rawDisk.source property but not both to create an image. the rawDisk.source property but not both to create an image.
returned: success returned: success
type: dict type: str
sourceDiskEncryptionKey: sourceDiskEncryptionKey:
description: description:
- The customer-supplied encryption key of the source disk. Required if the source - The customer-supplied encryption key of the source disk. Required if the source

View file

@ -181,10 +181,9 @@ options:
- If desired, you can also attach existing non-root persistent disks using - If desired, you can also attach existing non-root persistent disks using
this property. This field is only applicable for persistent disks. this property. This field is only applicable for persistent disks.
- 'This field represents a link to a Disk resource in GCP. It can be specified - 'This field represents a link to a Disk resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_disk in two ways. First, you can place in the selfLink of the resource here as
task and then set this source field to "{{ name-of-resource }}" Alternatively, a string Alternatively, you can add `register: name-of-resource` to a gcp_compute_disk
you can set this source to a dictionary with the selfLink key where the task and then set this source field to "{{ name-of-resource }}"'
value is the selfLink of your Disk'
required: false required: false
type: type:
description: description:
@ -267,10 +266,10 @@ options:
address pool. If you specify a static external IP address, it must live address pool. If you specify a static external IP address, it must live
in the same region as the zone of the instance. in the same region as the zone of the instance.
- 'This field represents a link to a Address resource in GCP. It can be - 'This field represents a link to a Address resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a specified in two ways. First, you can place in the address of the resource
gcp_compute_address task and then set this nat_ip field to "{{ name-of-resource here as a string Alternatively, you can add `register: name-of-resource`
}}" Alternatively, you can set this nat_ip to a dictionary with the to a gcp_compute_address task and then set this nat_ip field to "{{
address key where the value is the address of your Address' name-of-resource }}"'
required: false required: false
type: type:
description: description:
@ -310,10 +309,9 @@ options:
global/networks/default is used; if the network is not specified but the global/networks/default is used; if the network is not specified but the
subnetwork is specified, the network is inferred. subnetwork is specified, the network is inferred.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as
task and then set this network field to "{{ name-of-resource }}" Alternatively, a string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the task and then set this network field to "{{ name-of-resource }}"'
value is the selfLink of your Network'
required: false required: false
network_ip: network_ip:
description: description:
@ -328,10 +326,10 @@ options:
If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified. If the network is in custom subnet mode, then this field should be specified.
- 'This field represents a link to a Subnetwork resource in GCP. It can be - 'This field represents a link to a Subnetwork resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_subnetwork specified in two ways. First, you can place in the selfLink of the resource
task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource`
you can set this subnetwork to a dictionary with the selfLink key where to a gcp_compute_subnetwork task and then set this subnetwork field to "{{
the value is the selfLink of your Subnetwork' name-of-resource }}"'
required: false required: false
scheduling: scheduling:
description: description:
@ -629,7 +627,7 @@ disks:
- If desired, you can also attach existing non-root persistent disks using this - If desired, you can also attach existing non-root persistent disks using this
property. This field is only applicable for persistent disks. property. This field is only applicable for persistent disks.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
@ -725,7 +723,7 @@ networkInterfaces:
address pool. If you specify a static external IP address, it must live address pool. If you specify a static external IP address, it must live
in the same region as the zone of the instance. in the same region as the zone of the instance.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT. - The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -767,7 +765,7 @@ networkInterfaces:
global/networks/default is used; if the network is not specified but the subnetwork global/networks/default is used; if the network is not specified but the subnetwork
is specified, the network is inferred. is specified, the network is inferred.
returned: success returned: success
type: dict type: str
networkIP: networkIP:
description: description:
- An IPv4 internal network address to assign to the instance for this network - An IPv4 internal network address to assign to the instance for this network
@ -782,7 +780,7 @@ networkInterfaces:
the network is in auto subnet mode, providing the subnetwork is optional. the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified. If the network is in custom subnet mode, then this field should be specified.
returned: success returned: success
type: dict type: str
scheduling: scheduling:
description: description:
- Sets the scheduling options for this instance. - Sets the scheduling options for this instance.
@ -891,33 +889,36 @@ def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
can_ip_forward=dict(type='bool', aliases=['ip_forward']), can_ip_forward=dict(type='bool'),
disks=dict( disks=dict(type='list', elements='dict', options=dict(
type='list', auto_delete=dict(type='bool'),
elements='dict', boot=dict(type='bool'),
options=dict( device_name=dict(type='str'),
auto_delete=dict(type='bool'), disk_encryption_key=dict(type='dict', options=dict(
boot=dict(type='bool'), raw_key=dict(type='str'),
device_name=dict(type='str'), rsa_encrypted_key=dict(type='str'),
disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), rsa_encrypted_key=dict(type='str'))), sha256=dict(type='str')
index=dict(type='int'), )),
initialize_params=dict( index=dict(type='int'),
type='dict', initialize_params=dict(type='dict', options=dict(
options=dict( disk_name=dict(type='str'),
disk_name=dict(type='str'), disk_size_gb=dict(type='int'),
disk_size_gb=dict(type='int'), disk_type=dict(type='str'),
disk_type=dict(type='str'), source_image=dict(type='str'),
source_image=dict(type='str', aliases=['image', 'image_family']), source_image_encryption_key=dict(type='dict', options=dict(
source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))), raw_key=dict(type='str'),
), sha256=dict(type='str')
), ))
interface=dict(type='str', choices=['SCSI', 'NVME']), )),
mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']), interface=dict(type='str', choices=['SCSI', 'NVME']),
source=dict(type='dict'), mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']),
type=dict(type='str', choices=['SCRATCH', 'PERSISTENT']), source=dict(),
), type=dict(type='str', choices=['SCRATCH', 'PERSISTENT'])
), )),
guest_accelerators=dict(type='list', elements='dict', options=dict(accelerator_count=dict(type='int'), accelerator_type=dict(type='str'))), guest_accelerators=dict(type='list', elements='dict', options=dict(
accelerator_count=dict(type='int'),
accelerator_type=dict(type='str')
)),
label_fingerprint=dict(type='str'), label_fingerprint=dict(type='str'),
metadata=dict(type='dict'), metadata=dict(type='dict'),
machine_type=dict(type='str'), machine_type=dict(type='str'),
@ -926,7 +927,7 @@ def main():
network_interfaces=dict(type='list', elements='dict', options=dict( network_interfaces=dict(type='list', elements='dict', options=dict(
access_configs=dict(type='list', elements='dict', options=dict( access_configs=dict(type='list', elements='dict', options=dict(
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
nat_ip=dict(type='dict'), nat_ip=dict(),
type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT']) type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT'])
)), )),
alias_ip_ranges=dict(type='list', elements='dict', options=dict( alias_ip_ranges=dict(type='list', elements='dict', options=dict(
@ -934,9 +935,9 @@ def main():
subnetwork_range_name=dict(type='str') subnetwork_range_name=dict(type='str')
)), )),
name=dict(type='str'), name=dict(type='str'),
network=dict(type='dict'), network=dict(),
network_ip=dict(type='str'), network_ip=dict(type='str'),
subnetwork=dict(type='dict') subnetwork=dict()
)), )),
scheduling=dict(type='dict', options=dict( scheduling=dict(type='dict', options=dict(
automatic_restart=dict(type='bool'), automatic_restart=dict(type='bool'),

View file

@ -225,7 +225,7 @@ items:
- If desired, you can also attach existing non-root persistent disks using - If desired, you can also attach existing non-root persistent disks using
this property. This field is only applicable for persistent disks. this property. This field is only applicable for persistent disks.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
@ -323,7 +323,7 @@ items:
IP address pool. If you specify a static external IP address, it must IP address pool. If you specify a static external IP address, it must
live in the same region as the zone of the instance. live in the same region as the zone of the instance.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT. - The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -365,7 +365,7 @@ items:
default network global/networks/default is used; if the network is not default network global/networks/default is used; if the network is not
specified but the subnetwork is specified, the network is inferred. specified but the subnetwork is specified, the network is inferred.
returned: success returned: success
type: dict type: str
networkIP: networkIP:
description: description:
- An IPv4 internal network address to assign to the instance for this network - An IPv4 internal network address to assign to the instance for this network
@ -380,7 +380,7 @@ items:
If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified. If the network is in custom subnet mode, then this field should be specified.
returned: success returned: success
type: dict type: str
scheduling: scheduling:
description: description:
- Sets the scheduling options for this instance. - Sets the scheduling options for this instance.

View file

@ -83,10 +83,9 @@ options:
description: description:
- The network to which all instances in the instance group belong. - The network to which all instances in the instance group belong.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: false required: false
region: region:
description: description:
@ -96,10 +95,9 @@ options:
description: description:
- The subnetwork to which all instances in the instance group belong. - The subnetwork to which all instances in the instance group belong.
- 'This field represents a link to a Subnetwork resource in GCP. It can be specified - 'This field represents a link to a Subnetwork resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_subnetwork in two ways. First, you can place in the selfLink of the resource here as a
task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork
you can set this subnetwork to a dictionary with the selfLink key where the task and then set this subnetwork field to "{{ name-of-resource }}"'
value is the selfLink of your Subnetwork'
required: false required: false
zone: zone:
description: description:
@ -190,7 +188,7 @@ network:
description: description:
- The network to which all instances in the instance group belong. - The network to which all instances in the instance group belong.
returned: success returned: success
type: dict type: str
region: region:
description: description:
- The region where the instance group is located (for regional resources). - The region where the instance group is located (for regional resources).
@ -200,7 +198,7 @@ subnetwork:
description: description:
- The subnetwork to which all instances in the instance group belong. - The subnetwork to which all instances in the instance group belong.
returned: success returned: success
type: dict type: str
zone: zone:
description: description:
- A reference to the zone where the instance group resides. - A reference to the zone where the instance group resides.
@ -239,12 +237,15 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'), description=dict(type='str'),
name=dict(type='str'), name=dict(type='str'),
named_ports=dict(type='list', elements='dict', options=dict(name=dict(type='str'), port=dict(type='int'))), named_ports=dict(type='list', elements='dict', options=dict(
network=dict(type='dict'), name=dict(type='str'),
port=dict(type='int')
)),
network=dict(),
region=dict(type='str'), region=dict(type='str'),
subnetwork=dict(type='dict'), subnetwork=dict(),
zone=dict(required=True, type='str'), zone=dict(required=True, type='str'),
instances=dict(type='list', elements='dict') instances=dict(type='list')
) )
) )

View file

@ -117,7 +117,7 @@ items:
description: description:
- The network to which all instances in the instance group belong. - The network to which all instances in the instance group belong.
returned: success returned: success
type: dict type: str
region: region:
description: description:
- The region where the instance group is located (for regional resources). - The region where the instance group is located (for regional resources).
@ -127,7 +127,7 @@ items:
description: description:
- The subnetwork to which all instances in the instance group belong. - The subnetwork to which all instances in the instance group belong.
returned: success returned: success
type: dict type: str
zone: zone:
description: description:
- A reference to the zone where the instance group resides. - A reference to the zone where the instance group resides.

View file

@ -70,10 +70,10 @@ options:
group uses this template to create all new instances in the managed instance group uses this template to create all new instances in the managed instance
group. group.
- 'This field represents a link to a InstanceTemplate resource in GCP. It can - 'This field represents a link to a InstanceTemplate resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a gcp_compute_instance_template be specified in two ways. First, you can place in the selfLink of the resource
task and then set this instance_template field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource` to
you can set this instance_template to a dictionary with the selfLink key where a gcp_compute_instance_template task and then set this instance_template field
the value is the selfLink of your InstanceTemplate' to "{{ name-of-resource }}"'
required: true required: true
name: name:
description: description:
@ -261,13 +261,13 @@ instanceGroup:
description: description:
- The instance group being managed. - The instance group being managed.
returned: success returned: success
type: dict type: str
instanceTemplate: instanceTemplate:
description: description:
- The instance template that is specified for this managed instance group. The group - The instance template that is specified for this managed instance group. The group
uses this template to create all new instances in the managed instance group. uses this template to create all new instances in the managed instance group.
returned: success returned: success
type: dict type: str
name: name:
description: description:
- The name of the managed instance group. The name must be 1-63 characters long, - The name of the managed instance group. The name must be 1-63 characters long,
@ -339,10 +339,13 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
base_instance_name=dict(required=True, type='str'), base_instance_name=dict(required=True, type='str'),
description=dict(type='str'), description=dict(type='str'),
instance_template=dict(required=True, type='dict'), instance_template=dict(required=True),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
named_ports=dict(type='list', elements='dict', options=dict(name=dict(type='str'), port=dict(type='int'))), named_ports=dict(type='list', elements='dict', options=dict(
target_pools=dict(type='list', elements='dict'), name=dict(type='str'),
port=dict(type='int')
)),
target_pools=dict(type='list'),
target_size=dict(type='int'), target_size=dict(type='int'),
zone=dict(required=True, type='str'), zone=dict(required=True, type='str'),
) )

View file

@ -161,14 +161,14 @@ items:
description: description:
- The instance group being managed. - The instance group being managed.
returned: success returned: success
type: dict type: str
instanceTemplate: instanceTemplate:
description: description:
- The instance template that is specified for this managed instance group. The - The instance template that is specified for this managed instance group. The
group uses this template to create all new instances in the managed instance group uses this template to create all new instances in the managed instance
group. group.
returned: success returned: success
type: dict type: str
name: name:
description: description:
- The name of the managed instance group. The name must be 1-63 characters long, - The name of the managed instance group. The name must be 1-63 characters long,

View file

@ -211,10 +211,10 @@ options:
- Note that for InstanceTemplate, specify the disk name, not the URL for - Note that for InstanceTemplate, specify the disk name, not the URL for
the disk. the disk.
- 'This field represents a link to a Disk resource in GCP. It can be specified - 'This field represents a link to a Disk resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_disk in two ways. First, you can place in the name of the resource here as
task and then set this source field to "{{ name-of-resource }}" Alternatively, a string Alternatively, you can add `register: name-of-resource` to
you can set this source to a dictionary with the name key where the a gcp_compute_disk task and then set this source field to "{{ name-of-resource
value is the name of your Disk' }}"'
required: false required: false
type: type:
description: description:
@ -283,11 +283,10 @@ options:
IP address pool. If you specify a static external IP address, it IP address pool. If you specify a static external IP address, it
must live in the same region as the zone of the instance. must live in the same region as the zone of the instance.
- 'This field represents a link to a Address resource in GCP. It can - 'This field represents a link to a Address resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` be specified in two ways. First, you can place in the address of
to a gcp_compute_address task and then set this nat_ip field to the resource here as a string Alternatively, you can add `register:
"{{ name-of-resource }}" Alternatively, you can set this nat_ip name-of-resource` to a gcp_compute_address task and then set this
to a dictionary with the address key where the value is the address nat_ip field to "{{ name-of-resource }}"'
of your Address'
required: false required: false
type: type:
description: description:
@ -328,10 +327,10 @@ options:
default network global/networks/default is used; if the network is not default network global/networks/default is used; if the network is not
specified but the subnetwork is specified, the network is inferred. specified but the subnetwork is specified, the network is inferred.
- 'This field represents a link to a Network resource in GCP. It can be - 'This field represents a link to a Network resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a specified in two ways. First, you can place in the selfLink of the resource
gcp_compute_network task and then set this network field to "{{ name-of-resource here as a string Alternatively, you can add `register: name-of-resource`
}}" Alternatively, you can set this network to a dictionary with the to a gcp_compute_network task and then set this network field to "{{
selfLink key where the value is the selfLink of your Network' name-of-resource }}"'
required: false required: false
network_ip: network_ip:
description: description:
@ -346,11 +345,10 @@ options:
If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified. If the network is in custom subnet mode, then this field should be specified.
- 'This field represents a link to a Subnetwork resource in GCP. It can - 'This field represents a link to a Subnetwork resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to be specified in two ways. First, you can place in the selfLink of the
a gcp_compute_subnetwork task and then set this subnetwork field to resource here as a string Alternatively, you can add `register: name-of-resource`
"{{ name-of-resource }}" Alternatively, you can set this subnetwork to a gcp_compute_subnetwork task and then set this subnetwork field
to a dictionary with the selfLink key where the value is the selfLink to "{{ name-of-resource }}"'
of your Subnetwork'
required: false required: false
scheduling: scheduling:
description: description:
@ -643,7 +641,7 @@ properties:
- Note that for InstanceTemplate, specify the disk name, not the URL for - Note that for InstanceTemplate, specify the disk name, not the URL for
the disk. the disk.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
@ -716,7 +714,7 @@ properties:
IP address pool. If you specify a static external IP address, it must IP address pool. If you specify a static external IP address, it must
live in the same region as the zone of the instance. live in the same region as the zone of the instance.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT. - The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -758,7 +756,7 @@ properties:
default network global/networks/default is used; if the network is not default network global/networks/default is used; if the network is not
specified but the subnetwork is specified, the network is inferred. specified but the subnetwork is specified, the network is inferred.
returned: success returned: success
type: dict type: str
networkIP: networkIP:
description: description:
- An IPv4 internal network address to assign to the instance for this network - An IPv4 internal network address to assign to the instance for this network
@ -773,7 +771,7 @@ properties:
If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified. If the network is in custom subnet mode, then this field should be specified.
returned: success returned: success
type: dict type: str
scheduling: scheduling:
description: description:
- Sets the scheduling options for this instance. - Sets the scheduling options for this instance.
@ -893,7 +891,7 @@ def main():
)), )),
interface=dict(type='str', choices=['SCSI', 'NVME']), interface=dict(type='str', choices=['SCSI', 'NVME']),
mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']), mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']),
source=dict(type='dict'), source=dict(),
type=dict(type='str', choices=['SCRATCH', 'PERSISTENT']) type=dict(type='str', choices=['SCRATCH', 'PERSISTENT'])
)), )),
machine_type=dict(required=True, type='str'), machine_type=dict(required=True, type='str'),
@ -906,7 +904,7 @@ def main():
network_interfaces=dict(type='list', elements='dict', options=dict( network_interfaces=dict(type='list', elements='dict', options=dict(
access_configs=dict(type='list', elements='dict', options=dict( access_configs=dict(type='list', elements='dict', options=dict(
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
nat_ip=dict(type='dict'), nat_ip=dict(),
type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT']) type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT'])
)), )),
alias_ip_ranges=dict(type='list', elements='dict', options=dict( alias_ip_ranges=dict(type='list', elements='dict', options=dict(
@ -914,9 +912,9 @@ def main():
subnetwork_range_name=dict(type='str') subnetwork_range_name=dict(type='str')
)), )),
name=dict(type='str'), name=dict(type='str'),
network=dict(type='dict'), network=dict(),
network_ip=dict(type='str'), network_ip=dict(type='str'),
subnetwork=dict(type='dict') subnetwork=dict()
)), )),
scheduling=dict(type='dict', options=dict( scheduling=dict(type='dict', options=dict(
automatic_restart=dict(type='bool'), automatic_restart=dict(type='bool'),

View file

@ -250,7 +250,7 @@ items:
- Note that for InstanceTemplate, specify the disk name, not the URL - Note that for InstanceTemplate, specify the disk name, not the URL
for the disk. for the disk.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
@ -326,7 +326,7 @@ items:
ephemeral IP address pool. If you specify a static external IP ephemeral IP address pool. If you specify a static external IP
address, it must live in the same region as the zone of the instance. address, it must live in the same region as the zone of the instance.
returned: success returned: success
type: dict type: str
type: type:
description: description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT. - The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -370,7 +370,7 @@ items:
the default network global/networks/default is used; if the network the default network global/networks/default is used; if the network
is not specified but the subnetwork is specified, the network is inferred. is not specified but the subnetwork is specified, the network is inferred.
returned: success returned: success
type: dict type: str
networkIP: networkIP:
description: description:
- An IPv4 internal network address to assign to the instance for this - An IPv4 internal network address to assign to the instance for this
@ -386,7 +386,7 @@ items:
optional. If the network is in custom subnet mode, then this field optional. If the network is in custom subnet mode, then this field
should be specified. should be specified.
returned: success returned: success
type: dict type: str
scheduling: scheduling:
description: description:
- Sets the scheduling options for this instance. - Sets the scheduling options for this instance.

View file

@ -65,10 +65,9 @@ options:
will automatically connect the Interconnect to the network & region within which will automatically connect the Interconnect to the network & region within which
the Cloud Router is configured. the Cloud Router is configured.
- 'This field represents a link to a Router resource in GCP. It can be specified - 'This field represents a link to a Router resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_router in two ways. First, you can place in the selfLink of the resource here as a
task and then set this router field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_router
you can set this router to a dictionary with the selfLink key where the value task and then set this router field to "{{ name-of-resource }}"'
is the selfLink of your Router'
required: true required: true
name: name:
description: description:
@ -150,7 +149,7 @@ router:
automatically connect the Interconnect to the network & region within which the automatically connect the Interconnect to the network & region within which the
Cloud Router is configured. Cloud Router is configured.
returned: success returned: success
type: dict type: str
creationTimestamp: creationTimestamp:
description: description:
- Creation timestamp in RFC3339 text format. - Creation timestamp in RFC3339 text format.
@ -200,7 +199,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
interconnect=dict(required=True, type='str'), interconnect=dict(required=True, type='str'),
description=dict(type='str'), description=dict(type='str'),
router=dict(required=True, type='dict'), router=dict(required=True),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
region=dict(required=True, type='str') region=dict(required=True, type='str')
) )

View file

@ -119,7 +119,7 @@ items:
will automatically connect the Interconnect to the network & region within will automatically connect the Interconnect to the network & region within
which the Cloud Router is configured. which the Cloud Router is configured.
returned: success returned: success
type: dict type: str
creationTimestamp: creationTimestamp:
description: description:
- Creation timestamp in RFC3339 text format. - Creation timestamp in RFC3339 text format.

View file

@ -129,10 +129,9 @@ options:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource. or full URL to the resource.
- 'This field represents a link to a Snapshot resource in GCP. It can be specified - 'This field represents a link to a Snapshot resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_snapshot in two ways. First, you can place in the selfLink of the resource here as a
task and then set this source_snapshot field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_snapshot
you can set this source_snapshot to a dictionary with the selfLink key where task and then set this source_snapshot field to "{{ name-of-resource }}"'
the value is the selfLink of your Snapshot'
required: false required: false
source_snapshot_encryption_key: source_snapshot_encryption_key:
description: description:
@ -288,7 +287,7 @@ sourceSnapshot:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource. or full URL to the resource.
returned: success returned: success
type: dict type: str
sourceSnapshotEncryptionKey: sourceSnapshotEncryptionKey:
description: description:
- The customer-supplied encryption key of the source snapshot. Required if the source - The customer-supplied encryption key of the source snapshot. Required if the source
@ -351,7 +350,7 @@ def main():
raw_key=dict(type='str'), raw_key=dict(type='str'),
sha256=dict(type='str') sha256=dict(type='str')
)), )),
source_snapshot=dict(type='dict'), source_snapshot=dict(),
source_snapshot_encryption_key=dict(type='dict', options=dict( source_snapshot_encryption_key=dict(type='dict', options=dict(
raw_key=dict(type='str'), raw_key=dict(type='str'),
sha256=dict(type='str') sha256=dict(type='str')

View file

@ -185,7 +185,7 @@ items:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource. or full URL to the resource.
returned: success returned: success
type: dict type: str
sourceSnapshotEncryptionKey: sourceSnapshotEncryptionKey:
description: description:
- The customer-supplied encryption key of the source snapshot. Required if the - The customer-supplied encryption key of the source snapshot. Required if the

View file

@ -86,10 +86,9 @@ options:
description: description:
- The network that this route applies to. - The network that this route applies to.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: true required: true
priority: priority:
description: description:
@ -184,7 +183,7 @@ network:
description: description:
- The network that this route applies to. - The network that this route applies to.
returned: success returned: success
type: dict type: str
priority: priority:
description: description:
- The priority of this route. Priority is used to break ties in cases where there - The priority of this route. Priority is used to break ties in cases where there
@ -255,7 +254,7 @@ def main():
dest_range=dict(required=True, type='str'), dest_range=dict(required=True, type='str'),
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
network=dict(required=True, type='dict'), network=dict(required=True),
priority=dict(type='int'), priority=dict(type='int'),
tags=dict(type='list', elements='str'), tags=dict(type='list', elements='str'),
next_hop_gateway=dict(type='str'), next_hop_gateway=dict(type='str'),

View file

@ -90,7 +90,7 @@ items:
description: description:
- The network that this route applies to. - The network that this route applies to.
returned: success returned: success
type: dict type: str
priority: priority:
description: description:
- The priority of this route. Priority is used to break ties in cases where - The priority of this route. Priority is used to break ties in cases where

View file

@ -63,10 +63,9 @@ options:
description: description:
- A reference to the network to which this router belongs. - A reference to the network to which this router belongs.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: true required: true
bgp: bgp:
description: description:
@ -182,7 +181,7 @@ network:
description: description:
- A reference to the network to which this router belongs. - A reference to the network to which this router belongs.
returned: success returned: success
type: dict type: str
bgp: bgp:
description: description:
- BGP information specific to this router. - BGP information specific to this router.
@ -259,17 +258,17 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
description=dict(type='str'), description=dict(type='str'),
network=dict(required=True, type='dict'), network=dict(required=True),
bgp=dict( bgp=dict(type='dict', options=dict(
type='dict', asn=dict(required=True, type='int'),
options=dict( advertise_mode=dict(default='DEFAULT', type='str', choices=['DEFAULT', 'CUSTOM']),
asn=dict(required=True, type='int'), advertised_groups=dict(type='list', elements='str'),
advertise_mode=dict(default='DEFAULT', type='str', choices=['DEFAULT', 'CUSTOM']), advertised_ip_ranges=dict(type='list', elements='dict', options=dict(
advertised_groups=dict(type='list', elements='str'), range=dict(type='str'),
advertised_ip_ranges=dict(type='list', elements='dict', options=dict(range=dict(type='str'), description=dict(type='str'))), description=dict(type='str')
), ))
), )),
region=dict(required=True, type='str'), region=dict(required=True, type='str')
) )
) )

View file

@ -97,7 +97,7 @@ items:
description: description:
- A reference to the network to which this router belongs. - A reference to the network to which this router belongs.
returned: success returned: success
type: dict type: str
bgp: bgp:
description: description:
- BGP information specific to this router. - BGP information specific to this router.

View file

@ -89,10 +89,9 @@ options:
- The network this subnet belongs to. - The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks. - Only networks that are in the distributed mode can have subnetworks.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: true required: true
enable_flow_logs: enable_flow_logs:
description: description:
@ -207,7 +206,7 @@ network:
- The network this subnet belongs to. - The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks. - Only networks that are in the distributed mode can have subnetworks.
returned: success returned: success
type: dict type: str
enableFlowLogs: enableFlowLogs:
description: description:
- Whether to enable flow logging for this subnetwork. - Whether to enable flow logging for this subnetwork.
@ -277,7 +276,7 @@ def main():
description=dict(type='str'), description=dict(type='str'),
ip_cidr_range=dict(required=True, type='str'), ip_cidr_range=dict(required=True, type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
network=dict(required=True, type='dict'), network=dict(required=True),
enable_flow_logs=dict(type='bool'), enable_flow_logs=dict(type='bool'),
secondary_ip_ranges=dict(type='list', elements='dict', options=dict( secondary_ip_ranges=dict(type='list', elements='dict', options=dict(
range_name=dict(required=True, type='str'), range_name=dict(required=True, type='str'),

View file

@ -114,7 +114,7 @@ items:
- The network this subnet belongs to. - The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks. - Only networks that are in the distributed mode can have subnetworks.
returned: success returned: success
type: dict type: str
enableFlowLogs: enableFlowLogs:
description: description:
- Whether to enable flow logging for this subnetwork. - Whether to enable flow logging for this subnetwork.

View file

@ -66,10 +66,9 @@ options:
- A reference to the UrlMap resource that defines the mapping from URL to the - A reference to the UrlMap resource that defines the mapping from URL to the
BackendService. BackendService.
- 'This field represents a link to a UrlMap resource in GCP. It can be specified - 'This field represents a link to a UrlMap resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_url_map in two ways. First, you can place in the selfLink of the resource here as a
task and then set this url_map field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_url_map
you can set this url_map to a dictionary with the selfLink key where the value task and then set this url_map field to "{{ name-of-resource }}"'
is the selfLink of your UrlMap'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
@ -165,7 +164,7 @@ urlMap:
description: description:
- A reference to the UrlMap resource that defines the mapping from URL to the BackendService. - A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -189,7 +188,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
url_map=dict(required=True, type='dict'), url_map=dict(required=True)
) )
) )

View file

@ -94,7 +94,7 @@ items:
- A reference to the UrlMap resource that defines the mapping from URL to the - A reference to the UrlMap resource that defines the mapping from URL to the
BackendService. BackendService.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################

View file

@ -86,10 +86,9 @@ options:
resource. If not set, the TargetHttpsProxy resource will not have any SSL policy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy
configured. configured.
- 'This field represents a link to a SslPolicy resource in GCP. It can be specified - 'This field represents a link to a SslPolicy resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_ssl_policy in two ways. First, you can place in the selfLink of the resource here as a
task and then set this ssl_policy field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_ssl_policy
you can set this ssl_policy to a dictionary with the selfLink key where the task and then set this ssl_policy field to "{{ name-of-resource }}"'
value is the selfLink of your SslPolicy'
required: false required: false
version_added: 2.8 version_added: 2.8
url_map: url_map:
@ -97,10 +96,9 @@ options:
- A reference to the UrlMap resource that defines the mapping from URL to the - A reference to the UrlMap resource that defines the mapping from URL to the
BackendService. BackendService.
- 'This field represents a link to a UrlMap resource in GCP. It can be specified - 'This field represents a link to a UrlMap resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_url_map in two ways. First, you can place in the selfLink of the resource here as a
task and then set this url_map field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_url_map
you can set this url_map to a dictionary with the selfLink key where the value task and then set this url_map field to "{{ name-of-resource }}"'
is the selfLink of your UrlMap'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
@ -237,12 +235,12 @@ sslPolicy:
resource. If not set, the TargetHttpsProxy resource will not have any SSL policy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy
configured. configured.
returned: success returned: success
type: dict type: str
urlMap: urlMap:
description: description:
- A reference to the UrlMap resource that defines the mapping from URL to the BackendService. - A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -267,9 +265,9 @@ def main():
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
quic_override=dict(type='str', choices=['NONE', 'ENABLE', 'DISABLE']), quic_override=dict(type='str', choices=['NONE', 'ENABLE', 'DISABLE']),
ssl_certificates=dict(required=True, type='list', elements='dict'), ssl_certificates=dict(required=True, type='list'),
ssl_policy=dict(type='dict'), ssl_policy=dict(),
url_map=dict(required=True, type='dict') url_map=dict(required=True)
) )
) )

View file

@ -111,13 +111,13 @@ items:
resource. If not set, the TargetHttpsProxy resource will not have any SSL resource. If not set, the TargetHttpsProxy resource will not have any SSL
policy configured. policy configured.
returned: success returned: success
type: dict type: str
urlMap: urlMap:
description: description:
- A reference to the UrlMap resource that defines the mapping from URL to the - A reference to the UrlMap resource that defines the mapping from URL to the
BackendService. BackendService.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################

View file

@ -61,10 +61,9 @@ options:
pool in the "force" mode, where traffic will be spread to the healthy instances pool in the "force" mode, where traffic will be spread to the healthy instances
with the best effort, or to all instances when no instance is healthy. with the best effort, or to all instances when no instance is healthy.
- 'This field represents a link to a TargetPool resource in GCP. It can be specified - 'This field represents a link to a TargetPool resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_target_pool in two ways. First, you can place in the selfLink of the resource here as a
task and then set this backup_pool field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_target_pool
you can set this backup_pool to a dictionary with the selfLink key where the task and then set this backup_pool field to "{{ name-of-resource }}"'
value is the selfLink of your TargetPool'
required: false required: false
description: description:
description: description:
@ -91,10 +90,10 @@ options:
checks pass. If not specified it means all member instances will be considered checks pass. If not specified it means all member instances will be considered
healthy at all times. healthy at all times.
- 'This field represents a link to a HttpHealthCheck resource in GCP. It can be - 'This field represents a link to a HttpHealthCheck resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_http_health_check specified in two ways. First, you can place in the selfLink of the resource
task and then set this health_check field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource` to
you can set this health_check to a dictionary with the selfLink key where the a gcp_compute_http_health_check task and then set this health_check field to
value is the selfLink of your HttpHealthCheck' "{{ name-of-resource }}"'
required: false required: false
instances: instances:
description: description:
@ -159,7 +158,7 @@ backupPool:
pool in the "force" mode, where traffic will be spread to the healthy instances pool in the "force" mode, where traffic will be spread to the healthy instances
with the best effort, or to all instances when no instance is healthy. with the best effort, or to all instances when no instance is healthy.
returned: success returned: success
type: dict type: str
creationTimestamp: creationTimestamp:
description: description:
- Creation timestamp in RFC3339 text format. - Creation timestamp in RFC3339 text format.
@ -192,7 +191,7 @@ healthCheck:
checks pass. If not specified it means all member instances will be considered checks pass. If not specified it means all member instances will be considered
healthy at all times. healthy at all times.
returned: success returned: success
type: dict type: str
id: id:
description: description:
- The unique identifier for the resource. - The unique identifier for the resource.
@ -250,11 +249,11 @@ def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
backup_pool=dict(type='dict'), backup_pool=dict(),
description=dict(type='str'), description=dict(type='str'),
failover_ratio=dict(type='str'), failover_ratio=dict(type='str'),
health_check=dict(type='dict'), health_check=dict(),
instances=dict(type='list', elements='dict'), instances=dict(type='list'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
session_affinity=dict(type='str', choices=['NONE', 'CLIENT_IP', 'CLIENT_IP_PROTO']), session_affinity=dict(type='str', choices=['NONE', 'CLIENT_IP', 'CLIENT_IP_PROTO']),
region=dict(required=True, type='str'), region=dict(required=True, type='str'),

View file

@ -83,7 +83,7 @@ items:
primary pool in the "force" mode, where traffic will be spread to the healthy primary pool in the "force" mode, where traffic will be spread to the healthy
instances with the best effort, or to all instances when no instance is healthy. instances with the best effort, or to all instances when no instance is healthy.
returned: success returned: success
type: dict type: str
creationTimestamp: creationTimestamp:
description: description:
- Creation timestamp in RFC3339 text format. - Creation timestamp in RFC3339 text format.
@ -116,7 +116,7 @@ items:
checks pass. If not specified it means all member instances will be considered checks pass. If not specified it means all member instances will be considered
healthy at all times. healthy at all times.
returned: success returned: success
type: dict type: str
id: id:
description: description:
- The unique identifier for the resource. - The unique identifier for the resource.

View file

@ -73,10 +73,10 @@ options:
description: description:
- A reference to the BackendService resource. - A reference to the BackendService resource.
- 'This field represents a link to a BackendService resource in GCP. It can be - 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service specified in two ways. First, you can place in the selfLink of the resource
task and then set this service field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource` to
you can set this service to a dictionary with the selfLink key where the value a gcp_compute_backend_service task and then set this service field to "{{ name-of-resource
is the selfLink of your BackendService' }}"'
required: true required: true
ssl_certificates: ssl_certificates:
description: description:
@ -90,10 +90,9 @@ options:
resource. If not set, the TargetSslProxy resource will not have any SSL policy resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured. configured.
- 'This field represents a link to a SslPolicy resource in GCP. It can be specified - 'This field represents a link to a SslPolicy resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_ssl_policy in two ways. First, you can place in the selfLink of the resource here as a
task and then set this ssl_policy field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_ssl_policy
you can set this ssl_policy to a dictionary with the selfLink key where the task and then set this ssl_policy field to "{{ name-of-resource }}"'
value is the selfLink of your SslPolicy'
required: false required: false
version_added: 2.8 version_added: 2.8
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
@ -214,7 +213,7 @@ service:
description: description:
- A reference to the BackendService resource. - A reference to the BackendService resource.
returned: success returned: success
type: dict type: str
sslCertificates: sslCertificates:
description: description:
- A list of SslCertificate resources that are used to authenticate connections between - A list of SslCertificate resources that are used to authenticate connections between
@ -227,7 +226,7 @@ sslPolicy:
resource. If not set, the TargetSslProxy resource will not have any SSL policy resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured. configured.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -252,9 +251,9 @@ def main():
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']), proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']),
service=dict(required=True, type='dict'), service=dict(required=True),
ssl_certificates=dict(required=True, type='list', elements='dict'), ssl_certificates=dict(required=True, type='list'),
ssl_policy=dict(type='dict') ssl_policy=dict()
) )
) )

View file

@ -99,7 +99,7 @@ items:
description: description:
- A reference to the BackendService resource. - A reference to the BackendService resource.
returned: success returned: success
type: dict type: str
sslCertificates: sslCertificates:
description: description:
- A list of SslCertificate resources that are used to authenticate connections - A list of SslCertificate resources that are used to authenticate connections
@ -113,7 +113,7 @@ items:
resource. If not set, the TargetSslProxy resource will not have any SSL policy resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured. configured.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################

View file

@ -73,10 +73,10 @@ options:
description: description:
- A reference to the BackendService resource. - A reference to the BackendService resource.
- 'This field represents a link to a BackendService resource in GCP. It can be - 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service specified in two ways. First, you can place in the selfLink of the resource
task and then set this service field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource` to
you can set this service to a dictionary with the selfLink key where the value a gcp_compute_backend_service task and then set this service field to "{{ name-of-resource
is the selfLink of your BackendService' }}"'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
@ -173,7 +173,7 @@ service:
description: description:
- A reference to the BackendService resource. - A reference to the BackendService resource.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -198,7 +198,7 @@ def main():
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']), proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']),
service=dict(required=True, type='dict'), service=dict(required=True)
) )
) )

View file

@ -99,7 +99,7 @@ items:
description: description:
- A reference to the BackendService resource. - A reference to the BackendService resource.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################

View file

@ -65,10 +65,9 @@ options:
description: description:
- The network this VPN gateway is accepting traffic for. - The network this VPN gateway is accepting traffic for.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network in two ways. First, you can place in the selfLink of the resource here as a
task and then set this network field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
you can set this network to a dictionary with the selfLink key where the value task and then set this network field to "{{ name-of-resource }}"'
is the selfLink of your Network'
required: true required: true
region: region:
description: description:
@ -140,7 +139,7 @@ network:
description: description:
- The network this VPN gateway is accepting traffic for. - The network this VPN gateway is accepting traffic for.
returned: success returned: success
type: dict type: str
tunnels: tunnels:
description: description:
- A list of references to VpnTunnel resources associated to this VPN gateway. - A list of references to VpnTunnel resources associated to this VPN gateway.
@ -179,8 +178,8 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
network=dict(required=True, type='dict'), network=dict(required=True),
region=dict(required=True, type='str'), region=dict(required=True, type='str')
) )
) )

View file

@ -98,7 +98,7 @@ items:
description: description:
- The network this VPN gateway is accepting traffic for. - The network this VPN gateway is accepting traffic for.
returned: success returned: success
type: dict type: str
tunnels: tunnels:
description: description:
- A list of references to VpnTunnel resources associated to this VPN gateway. - A list of references to VpnTunnel resources associated to this VPN gateway.

View file

@ -52,10 +52,10 @@ options:
description: description:
- A reference to BackendService resource if none of the hostRules match. - A reference to BackendService resource if none of the hostRules match.
- 'This field represents a link to a BackendService resource in GCP. It can be - 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service specified in two ways. First, you can place in the selfLink of the resource
task and then set this default_service field to "{{ name-of-resource }}" Alternatively, here as a string Alternatively, you can add `register: name-of-resource` to
you can set this default_service to a dictionary with the selfLink key where a gcp_compute_backend_service task and then set this default_service field to
the value is the selfLink of your BackendService' "{{ name-of-resource }}"'
required: true required: true
description: description:
description: description:
@ -102,11 +102,10 @@ options:
- A reference to a BackendService resource. This will be used if none of the - A reference to a BackendService resource. This will be used if none of the
pathRules defined by this PathMatcher is matched by the URL's path portion. pathRules defined by this PathMatcher is matched by the URL's path portion.
- 'This field represents a link to a BackendService resource in GCP. It can - 'This field represents a link to a BackendService resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a be specified in two ways. First, you can place in the selfLink of the resource
gcp_compute_backend_service task and then set this default_service field here as a string Alternatively, you can add `register: name-of-resource`
to "{{ name-of-resource }}" Alternatively, you can set this default_service to a gcp_compute_backend_service task and then set this default_service
to a dictionary with the selfLink key where the value is the selfLink of field to "{{ name-of-resource }}"'
your BackendService'
required: true required: true
description: description:
description: description:
@ -132,11 +131,10 @@ options:
description: description:
- A reference to the BackendService resource if this rule is matched. - A reference to the BackendService resource if this rule is matched.
- 'This field represents a link to a BackendService resource in GCP. It - 'This field represents a link to a BackendService resource in GCP. It
can be specified in two ways. You can add `register: name-of-resource` can be specified in two ways. First, you can place in the selfLink of
to a gcp_compute_backend_service task and then set this service field the resource here as a string Alternatively, you can add `register:
to "{{ name-of-resource }}" Alternatively, you can set this service name-of-resource` to a gcp_compute_backend_service task and then set
to a dictionary with the selfLink key where the value is the selfLink this service field to "{{ name-of-resource }}"'
of your BackendService'
required: true required: true
tests: tests:
description: description:
@ -161,10 +159,10 @@ options:
- A reference to expected BackendService resource the given URL should be - A reference to expected BackendService resource the given URL should be
mapped to. mapped to.
- 'This field represents a link to a BackendService resource in GCP. It can - 'This field represents a link to a BackendService resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a be specified in two ways. First, you can place in the selfLink of the resource
gcp_compute_backend_service task and then set this service field to "{{ here as a string Alternatively, you can add `register: name-of-resource`
name-of-resource }}" Alternatively, you can set this service to a dictionary to a gcp_compute_backend_service task and then set this service field to
with the selfLink key where the value is the selfLink of your BackendService' "{{ name-of-resource }}"'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -227,7 +225,7 @@ defaultService:
description: description:
- A reference to BackendService resource if none of the hostRules match. - A reference to BackendService resource if none of the hostRules match.
returned: success returned: success
type: dict type: str
description: description:
description: description:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
@ -291,7 +289,7 @@ pathMatchers:
- A reference to a BackendService resource. This will be used if none of the - A reference to a BackendService resource. This will be used if none of the
pathRules defined by this PathMatcher is matched by the URL's path portion. pathRules defined by this PathMatcher is matched by the URL's path portion.
returned: success returned: success
type: dict type: str
description: description:
description: description:
- An optional description of this resource. - An optional description of this resource.
@ -320,7 +318,7 @@ pathMatchers:
description: description:
- A reference to the BackendService resource if this rule is matched. - A reference to the BackendService resource if this rule is matched.
returned: success returned: success
type: dict type: str
tests: tests:
description: description:
- The list of expected URL mappings. Requests to update this UrlMap will succeed - The list of expected URL mappings. Requests to update this UrlMap will succeed
@ -348,7 +346,7 @@ tests:
- A reference to expected BackendService resource the given URL should be mapped - A reference to expected BackendService resource the given URL should be mapped
to. to.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -370,7 +368,7 @@ def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
default_service=dict(required=True, type='dict'), default_service=dict(required=True),
description=dict(type='str'), description=dict(type='str'),
host_rules=dict(type='list', elements='dict', options=dict( host_rules=dict(type='list', elements='dict', options=dict(
description=dict(type='str'), description=dict(type='str'),
@ -379,19 +377,19 @@ def main():
)), )),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
path_matchers=dict(type='list', elements='dict', options=dict( path_matchers=dict(type='list', elements='dict', options=dict(
default_service=dict(required=True, type='dict'), default_service=dict(required=True),
description=dict(type='str'), description=dict(type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
path_rules=dict(type='list', elements='dict', options=dict( path_rules=dict(type='list', elements='dict', options=dict(
paths=dict(required=True, type='list', elements='str'), paths=dict(required=True, type='list', elements='str'),
service=dict(required=True, type='dict') service=dict(required=True)
)) ))
)), )),
tests=dict(type='list', elements='dict', options=dict( tests=dict(type='list', elements='dict', options=dict(
description=dict(type='str'), description=dict(type='str'),
host=dict(required=True, type='str'), host=dict(required=True, type='str'),
path=dict(required=True, type='str'), path=dict(required=True, type='str'),
service=dict(required=True, type='dict') service=dict(required=True)
)) ))
) )
) )

View file

@ -73,7 +73,7 @@ items:
description: description:
- A reference to BackendService resource if none of the hostRules match. - A reference to BackendService resource if none of the hostRules match.
returned: success returned: success
type: dict type: str
description: description:
description: description:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
@ -138,7 +138,7 @@ items:
the pathRules defined by this PathMatcher is matched by the URL's path the pathRules defined by this PathMatcher is matched by the URL's path
portion. portion.
returned: success returned: success
type: dict type: str
description: description:
description: description:
- An optional description of this resource. - An optional description of this resource.
@ -167,7 +167,7 @@ items:
description: description:
- A reference to the BackendService resource if this rule is matched. - A reference to the BackendService resource if this rule is matched.
returned: success returned: success
type: dict type: str
tests: tests:
description: description:
- The list of expected URL mappings. Requests to update this UrlMap will succeed - The list of expected URL mappings. Requests to update this UrlMap will succeed
@ -195,7 +195,7 @@ items:
- A reference to expected BackendService resource the given URL should be - A reference to expected BackendService resource the given URL should be
mapped to. mapped to.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################

View file

@ -63,19 +63,18 @@ options:
description: description:
- URL of the Target VPN gateway with which this VPN tunnel is associated. - URL of the Target VPN gateway with which this VPN tunnel is associated.
- 'This field represents a link to a TargetVpnGateway resource in GCP. It can - 'This field represents a link to a TargetVpnGateway resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a gcp_compute_target_vpn_gateway be specified in two ways. First, you can place in the selfLink of the resource
task and then set this target_vpn_gateway field to "{{ name-of-resource }}" here as a string Alternatively, you can add `register: name-of-resource` to
Alternatively, you can set this target_vpn_gateway to a dictionary with the a gcp_compute_target_vpn_gateway task and then set this target_vpn_gateway field
selfLink key where the value is the selfLink of your TargetVpnGateway' to "{{ name-of-resource }}"'
required: true required: true
router: router:
description: description:
- URL of router resource to be used for dynamic routing. - URL of router resource to be used for dynamic routing.
- 'This field represents a link to a Router resource in GCP. It can be specified - 'This field represents a link to a Router resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_router in two ways. First, you can place in the selfLink of the resource here as a
task and then set this router field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_compute_router
you can set this router to a dictionary with the selfLink key where the value task and then set this router field to "{{ name-of-resource }}"'
is the selfLink of your Router'
required: false required: false
peer_ip: peer_ip:
description: description:
@ -198,12 +197,12 @@ targetVpnGateway:
description: description:
- URL of the Target VPN gateway with which this VPN tunnel is associated. - URL of the Target VPN gateway with which this VPN tunnel is associated.
returned: success returned: success
type: dict type: str
router: router:
description: description:
- URL of router resource to be used for dynamic routing. - URL of router resource to be used for dynamic routing.
returned: success returned: success
type: dict type: str
peerIp: peerIp:
description: description:
- IP address of the peer VPN gateway. Only IPv4 is supported. - IP address of the peer VPN gateway. Only IPv4 is supported.
@ -281,8 +280,8 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
description=dict(type='str'), description=dict(type='str'),
target_vpn_gateway=dict(required=True, type='dict'), target_vpn_gateway=dict(required=True),
router=dict(type='dict'), router=dict(),
peer_ip=dict(required=True, type='str'), peer_ip=dict(required=True, type='str'),
shared_secret=dict(required=True, type='str'), shared_secret=dict(required=True, type='str'),
ike_version=dict(default=2, type='int'), ike_version=dict(default=2, type='int'),

View file

@ -92,12 +92,12 @@ items:
description: description:
- URL of the Target VPN gateway with which this VPN tunnel is associated. - URL of the Target VPN gateway with which this VPN tunnel is associated.
returned: success returned: success
type: dict type: str
router: router:
description: description:
- URL of router resource to be used for dynamic routing. - URL of router resource to be used for dynamic routing.
returned: success returned: success
type: dict type: str
peerIp: peerIp:
description: description:
- IP address of the peer VPN gateway. Only IPv4 is supported. - IP address of the peer VPN gateway. Only IPv4 is supported.

View file

@ -203,10 +203,9 @@ options:
description: description:
- The cluster this node pool belongs to. - The cluster this node pool belongs to.
- 'This field represents a link to a Cluster resource in GCP. It can be specified - 'This field represents a link to a Cluster resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_container_cluster in two ways. First, you can place in the name of the resource here as a string
task and then set this cluster field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_container_cluster
you can set this cluster to a dictionary with the name key where the value is task and then set this cluster field to "{{ name-of-resource }}"'
the name of your Cluster'
required: true required: true
zone: zone:
description: description:
@ -415,7 +414,7 @@ cluster:
description: description:
- The cluster this node pool belongs to. - The cluster this node pool belongs to.
returned: success returned: success
type: dict type: str
zone: zone:
description: description:
- The zone where the node pool is deployed. - The zone where the node pool is deployed.
@ -459,13 +458,21 @@ def main():
), ),
), ),
initial_node_count=dict(required=True, type='int'), initial_node_count=dict(required=True, type='int'),
version=dict(type='str'), autoscaling=dict(type='dict', options=dict(
autoscaling=dict(type='dict', options=dict(enabled=dict(type='bool'), min_node_count=dict(type='int'), max_node_count=dict(type='int'))), enabled=dict(type='bool'),
management=dict( min_node_count=dict(type='int'),
type='dict', options=dict(auto_upgrade=dict(type='bool'), auto_repair=dict(type='bool'), upgrade_options=dict(type='dict', options=dict())) max_node_count=dict(type='int')
), )),
cluster=dict(required=True, type='dict'), management=dict(type='dict', options=dict(
location=dict(required=True, type='str', aliases=['region', 'zone']), auto_upgrade=dict(type='bool'),
auto_repair=dict(type='bool'),
upgrade_options=dict(type='dict', options=dict(
auto_upgrade_start_time=dict(type='str'),
description=dict(type='str')
))
)),
cluster=dict(required=True),
zone=dict(required=True, type='str')
) )
) )

View file

@ -49,10 +49,9 @@ options:
description: description:
- The cluster this node pool belongs to. - The cluster this node pool belongs to.
- 'This field represents a link to a Cluster resource in GCP. It can be specified - 'This field represents a link to a Cluster resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_container_cluster in two ways. First, you can place in the name of the resource here as a string
task and then set this cluster field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_container_cluster
you can set this cluster to a dictionary with the name key where the value is task and then set this cluster field to "{{ name-of-resource }}"'
the name of your Cluster'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -249,7 +248,7 @@ items:
description: description:
- The cluster this node pool belongs to. - The cluster this node pool belongs to.
returned: success returned: success
type: dict type: str
zone: zone:
description: description:
- The zone where the node pool is deployed. - The zone where the node pool is deployed.
@ -272,7 +271,7 @@ def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
zone=dict(required=True, type='str'), zone=dict(required=True, type='str'),
cluster=dict(required=True, type='dict') cluster=dict(required=True)
) )
) )

View file

@ -85,10 +85,9 @@ options:
- Identifies the managed zone addressed by this request. - Identifies the managed zone addressed by this request.
- Can be the managed zone name or id. - Can be the managed zone name or id.
- 'This field represents a link to a ManagedZone resource in GCP. It can be specified - 'This field represents a link to a ManagedZone resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_dns_managed_zone in two ways. First, you can place in the name of the resource here as a string
task and then set this managed_zone field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_dns_managed_zone
you can set this managed_zone to a dictionary with the name key where the value task and then set this managed_zone field to "{{ name-of-resource }}"'
is the name of your ManagedZone'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -146,7 +145,7 @@ managed_zone:
- Identifies the managed zone addressed by this request. - Identifies the managed zone addressed by this request.
- Can be the managed zone name or id. - Can be the managed zone name or id.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -174,7 +173,7 @@ def main():
type=dict(required=True, type='str', choices=['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'SPF', 'SRV', 'TLSA', 'TXT']), type=dict(required=True, type='str', choices=['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'SPF', 'SRV', 'TLSA', 'TXT']),
ttl=dict(type='int'), ttl=dict(type='int'),
target=dict(type='list', elements='str'), target=dict(type='list', elements='str'),
managed_zone=dict(required=True, type='dict'), managed_zone=dict(required=True)
) )
) )

View file

@ -46,10 +46,9 @@ options:
- Identifies the managed zone addressed by this request. - Identifies the managed zone addressed by this request.
- Can be the managed zone name or id. - Can be the managed zone name or id.
- 'This field represents a link to a ManagedZone resource in GCP. It can be specified - 'This field represents a link to a ManagedZone resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_dns_managed_zone in two ways. First, you can place in the name of the resource here as a string
task and then set this managed_zone field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_dns_managed_zone
you can set this managed_zone to a dictionary with the name key where the value task and then set this managed_zone field to "{{ name-of-resource }}"'
is the name of your ManagedZone'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -94,7 +93,7 @@ items:
- Identifies the managed zone addressed by this request. - Identifies the managed zone addressed by this request.
- Can be the managed zone name or id. - Can be the managed zone name or id.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -111,7 +110,7 @@ import json
def main(): def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
managed_zone=dict(required=True, type='dict') managed_zone=dict(required=True)
) )
) )

View file

@ -68,10 +68,9 @@ options:
description: description:
- The name of the serviceAccount. - The name of the serviceAccount.
- 'This field represents a link to a ServiceAccount resource in GCP. It can be - 'This field represents a link to a ServiceAccount resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_iam_service_account specified in two ways. First, you can place in the name of the resource here
task and then set this service_account field to "{{ name-of-resource }}" Alternatively, as a string Alternatively, you can add `register: name-of-resource` to a gcp_iam_service_account
you can set this service_account to a dictionary with the name key where the task and then set this service_account field to "{{ name-of-resource }}"'
value is the name of your ServiceAccount'
required: false required: false
path: path:
description: description:
@ -144,7 +143,7 @@ serviceAccount:
description: description:
- The name of the serviceAccount. - The name of the serviceAccount.
returned: success returned: success
type: dict type: str
path: path:
description: description:
- The full name of the file that will hold the service account private key. The - The full name of the file that will hold the service account private key. The
@ -178,7 +177,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
private_key_type=dict(type='str', choices=['TYPE_UNSPECIFIED', 'TYPE_PKCS12_FILE', 'TYPE_GOOGLE_CREDENTIALS_FILE']), private_key_type=dict(type='str', choices=['TYPE_UNSPECIFIED', 'TYPE_PKCS12_FILE', 'TYPE_GOOGLE_CREDENTIALS_FILE']),
key_algorithm=dict(type='str', choices=['KEY_ALG_UNSPECIFIED', 'KEY_ALG_RSA_1024', 'KEY_ALG_RSA_2048']), key_algorithm=dict(type='str', choices=['KEY_ALG_UNSPECIFIED', 'KEY_ALG_RSA_1024', 'KEY_ALG_RSA_2048']),
service_account=dict(type='dict'), service_account=dict(),
path=dict(type='path') path=dict(type='path')
) )
) )

View file

@ -56,10 +56,9 @@ options:
description: description:
- A reference to a Topic resource. - A reference to a Topic resource.
- 'This field represents a link to a Topic resource in GCP. It can be specified - 'This field represents a link to a Topic resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_pubsub_topic in two ways. First, you can place in the name of the resource here as a string
task and then set this topic field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_pubsub_topic
you can set this topic to a dictionary with the name key where the value is task and then set this topic field to "{{ name-of-resource }}"'
the name of your Topic'
required: false required: false
push_config: push_config:
description: description:
@ -127,7 +126,7 @@ topic:
description: description:
- A reference to a Topic resource. - A reference to a Topic resource.
returned: success returned: success
type: dict type: str
pushConfig: pushConfig:
description: description:
- If push delivery is used with this subscription, this field is used to configure - If push delivery is used with this subscription, this field is used to configure
@ -180,13 +179,12 @@ def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'), name=dict(type='str'),
topic=dict(required=True, type='dict'), topic=dict(),
labels=dict(type='dict'), push_config=dict(type='dict', options=dict(
push_config=dict(type='dict', options=dict(push_endpoint=dict(required=True, type='str'), attributes=dict(type='dict'))), push_endpoint=dict(type='str')
ack_deadline_seconds=dict(type='int'), )),
message_retention_duration=dict(default='604800s', type='str'), ack_deadline_seconds=dict(type='int')
retain_acked_messages=dict(type='bool'),
) )
) )

View file

@ -67,7 +67,7 @@ items:
description: description:
- A reference to a Topic resource. - A reference to a Topic resource.
returned: success returned: success
type: dict type: str
pushConfig: pushConfig:
description: description:
- If push delivery is used with this subscription, this field is used to configure - If push delivery is used with this subscription, this field is used to configure

View file

@ -64,10 +64,9 @@ options:
description: description:
- The instance to create the database on. - The instance to create the database on.
- 'This field represents a link to a Instance resource in GCP. It can be specified - 'This field represents a link to a Instance resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_spanner_instance in two ways. First, you can place in the name of the resource here as a string
task and then set this instance field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_spanner_instance
you can set this instance to a dictionary with the name key where the value task and then set this instance field to "{{ name-of-resource }}"'
is the name of your Instance'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
@ -120,7 +119,7 @@ instance:
description: description:
- The instance to create the database on. - The instance to create the database on.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -143,7 +142,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
extra_statements=dict(type='list', elements='str'), extra_statements=dict(type='list', elements='str'),
instance=dict(required=True, type='dict'), instance=dict(required=True)
) )
) )

View file

@ -45,10 +45,9 @@ options:
description: description:
- The instance to create the database on. - The instance to create the database on.
- 'This field represents a link to a Instance resource in GCP. It can be specified - 'This field represents a link to a Instance resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_spanner_instance in two ways. First, you can place in the name of the resource here as a string
task and then set this instance field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_spanner_instance
you can set this instance to a dictionary with the name key where the value task and then set this instance field to "{{ name-of-resource }}"'
is the name of your Instance'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -87,7 +86,7 @@ items:
description: description:
- The instance to create the database on. - The instance to create the database on.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -104,7 +103,7 @@ import json
def main(): def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
instance=dict(required=True, type='dict') instance=dict(required=True)
) )
) )

View file

@ -64,10 +64,9 @@ options:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
- 'This field represents a link to a Instance resource in GCP. It can be specified - 'This field represents a link to a Instance resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_sql_instance in two ways. First, you can place in the name of the resource here as a string
task and then set this instance field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance
you can set this instance to a dictionary with the name key where the value task and then set this instance field to "{{ name-of-resource }}"'
is the name of your Instance'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -121,7 +120,7 @@ instance:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -145,8 +144,8 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
charset=dict(type='str'), charset=dict(type='str'),
collation=dict(type='str'), collation=dict(type='str'),
name=dict(required=True, type='str'), name=dict(type='str'),
instance=dict(required=True, type='str'), instance=dict(required=True)
) )
) )

View file

@ -45,10 +45,9 @@ options:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
- 'This field represents a link to a Instance resource in GCP. It can be specified - 'This field represents a link to a Instance resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_sql_instance in two ways. First, you can place in the name of the resource here as a string
task and then set this instance field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance
you can set this instance to a dictionary with the name key where the value task and then set this instance field to "{{ name-of-resource }}"'
is the name of your Instance'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -88,7 +87,7 @@ items:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
returned: success returned: success
type: dict type: str
''' '''
################################################################################ ################################################################################
@ -105,7 +104,7 @@ import json
def main(): def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
instance=dict(required=True, type='dict') instance=dict(required=True)
) )
) )

View file

@ -61,10 +61,9 @@ options:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
- 'This field represents a link to a Instance resource in GCP. It can be specified - 'This field represents a link to a Instance resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_sql_instance in two ways. First, you can place in the name of the resource here as a string
task and then set this instance field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance
you can set this instance to a dictionary with the name key where the value task and then set this instance field to "{{ name-of-resource }}"'
is the name of your Instance'
required: true required: true
password: password:
description: description:
@ -119,7 +118,7 @@ instance:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
returned: success returned: success
type: dict type: str
password: password:
description: description:
- The password for the user. - The password for the user.
@ -148,8 +147,8 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
host=dict(required=True, type='str'), host=dict(required=True, type='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
instance=dict(required=True, type='dict'), instance=dict(required=True),
password=dict(type='str'), password=dict(type='str')
) )
) )

View file

@ -45,10 +45,9 @@ options:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
- 'This field represents a link to a Instance resource in GCP. It can be specified - 'This field represents a link to a Instance resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_sql_instance in two ways. First, you can place in the name of the resource here as a string
task and then set this instance field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance
you can set this instance to a dictionary with the name key where the value task and then set this instance field to "{{ name-of-resource }}"'
is the name of your Instance'
required: true required: true
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -84,7 +83,7 @@ items:
description: description:
- The name of the Cloud SQL instance. This does not include the project ID. - The name of the Cloud SQL instance. This does not include the project ID.
returned: success returned: success
type: dict type: str
password: password:
description: description:
- The password for the user. - The password for the user.
@ -106,7 +105,7 @@ import json
def main(): def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
instance=dict(required=True, type='dict') instance=dict(required=True)
) )
) )

View file

@ -61,10 +61,9 @@ options:
description: description:
- The name of the bucket. - The name of the bucket.
- 'This field represents a link to a Bucket resource in GCP. It can be specified - 'This field represents a link to a Bucket resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_storage_bucket in two ways. First, you can place in the name of the resource here as a
task and then set this bucket field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket
you can set this bucket to a dictionary with the name key where the value task and then set this bucket field to "{{ name-of-resource }}"'
is the name of your Bucket'
required: true required: true
domain: domain:
description: description:
@ -153,10 +152,9 @@ options:
description: description:
- The name of the bucket. - The name of the bucket.
- 'This field represents a link to a Bucket resource in GCP. It can be specified - 'This field represents a link to a Bucket resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_storage_bucket in two ways. First, you can place in the name of the resource here as a
task and then set this bucket field to "{{ name-of-resource }}" Alternatively, string Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket
you can set this bucket to a dictionary with the name key where the value task and then set this bucket field to "{{ name-of-resource }}"'
is the name of your Bucket'
required: true required: true
domain: domain:
description: description:
@ -414,7 +412,7 @@ acl:
description: description:
- The name of the bucket. - The name of the bucket.
returned: success returned: success
type: dict type: str
domain: domain:
description: description:
- The domain associated with the entity. - The domain associated with the entity.
@ -508,7 +506,7 @@ defaultObjectAcl:
description: description:
- The name of the bucket. - The name of the bucket.
returned: success returned: success
type: dict type: str
domain: domain:
description: description:
- The domain associated with the entity. - The domain associated with the entity.
@ -792,7 +790,7 @@ def main():
argument_spec=dict( argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
acl=dict(type='list', elements='dict', options=dict( acl=dict(type='list', elements='dict', options=dict(
bucket=dict(required=True, type='dict'), bucket=dict(required=True),
domain=dict(type='str'), domain=dict(type='str'),
email=dict(type='str'), email=dict(type='str'),
entity=dict(required=True, type='str'), entity=dict(required=True, type='str'),
@ -811,7 +809,7 @@ def main():
response_header=dict(type='list', elements='str') response_header=dict(type='list', elements='str')
)), )),
default_object_acl=dict(type='list', elements='dict', options=dict( default_object_acl=dict(type='list', elements='dict', options=dict(
bucket=dict(required=True, type='dict'), bucket=dict(required=True),
domain=dict(type='str'), domain=dict(type='str'),
email=dict(type='str'), email=dict(type='str'),
entity=dict(required=True, type='str'), entity=dict(required=True, type='str'),

View file

@ -60,10 +60,9 @@ options:
description: description:
- The name of the bucket. - The name of the bucket.
- 'This field represents a link to a Bucket resource in GCP. It can be specified - 'This field represents a link to a Bucket resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_storage_bucket in two ways. First, you can place in the name of the resource here as a string
task and then set this bucket field to "{{ name-of-resource }}" Alternatively, Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket
you can set this bucket to a dictionary with the name key where the value is task and then set this bucket field to "{{ name-of-resource }}"'
the name of your Bucket'
required: true required: true
entity: entity:
description: description:
@ -132,7 +131,7 @@ bucket:
description: description:
- The name of the bucket. - The name of the bucket.
returned: success returned: success
type: dict type: str
domain: domain:
description: description:
- The domain associated with the entity. - The domain associated with the entity.
@ -204,7 +203,7 @@ def main():
module = GcpModule( module = GcpModule(
argument_spec=dict( argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'), state=dict(default='present', choices=['present', 'absent'], type='str'),
bucket=dict(required=True, type='dict'), bucket=dict(required=True),
entity=dict(required=True, type='str'), entity=dict(required=True, type='str'),
entity_id=dict(type='str'), entity_id=dict(type='str'),
project_team=dict(type='dict', options=dict(project_number=dict(type='str'), team=dict(type='str', choices=['editors', 'owners', 'viewers']))), project_team=dict(type='dict', options=dict(project_number=dict(type='str'), team=dict(type='str', choices=['editors', 'owners', 'viewers']))),