From bafefea662e31f2d774db3a3c193366133e6d1d9 Mon Sep 17 00:00:00 2001 From: Riley Karson Date: Wed, 13 Nov 2019 21:02:40 +0000 Subject: [PATCH] [DO NOT MERGE] 3.0.0 staging branch Signed-off-by: Modular Magician --- plugins/modules/gcp_bigquery_dataset.py | 4 +-- plugins/modules/gcp_cloudbuild_trigger.py | 21 ++++++++------ .../gcp_cloudfunctions_cloud_function.py | 4 +-- plugins/modules/gcp_cloudscheduler_job.py | 11 ++++---- plugins/modules/gcp_compute_backend_bucket.py | 13 ++++----- .../gcp_compute_backend_bucket_info.py | 4 +-- .../modules/gcp_compute_backend_service.py | 4 +-- plugins/modules/gcp_compute_firewall.py | 1 - .../modules/gcp_compute_forwarding_rule.py | 14 ---------- .../gcp_compute_forwarding_rule_info.py | 5 ---- plugins/modules/gcp_compute_health_check.py | 3 +- plugins/modules/gcp_compute_image.py | 4 +-- plugins/modules/gcp_compute_network.py | 28 +------------------ plugins/modules/gcp_compute_network_info.py | 11 -------- plugins/modules/gcp_compute_route.py | 2 +- plugins/modules/gcp_compute_router.py | 4 +-- plugins/modules/gcp_compute_subnetwork.py | 21 ++------------ .../modules/gcp_compute_subnetwork_info.py | 5 ---- plugins/modules/gcp_dns_managed_zone.py | 8 ++++-- plugins/modules/gcp_logging_metric.py | 4 +-- plugins/modules/gcp_mlengine_model.py | 4 +-- plugins/modules/gcp_pubsub_subscription.py | 8 +++--- .../modules/gcp_pubsub_subscription_info.py | 2 +- plugins/modules/gcp_tpu_node.py | 5 ++-- 24 files changed, 57 insertions(+), 133 deletions(-) diff --git a/plugins/modules/gcp_bigquery_dataset.py b/plugins/modules/gcp_bigquery_dataset.py index 074a91f..8942063 100644 --- a/plugins/modules/gcp_bigquery_dataset.py +++ b/plugins/modules/gcp_bigquery_dataset.py @@ -77,7 +77,7 @@ options: Predefined roles that have equivalent primitive roles are swapped by the API to their Primitive counterparts, and will show a diff post-create. See [official docs](U(https://cloud.google.com/bigquery/docs/access-control)). - required: false + required: true type: str special_group: description: @@ -489,7 +489,7 @@ def main(): options=dict( domain=dict(type='str'), group_by_email=dict(type='str'), - role=dict(type='str'), + role=dict(required=True, type='str'), special_group=dict(type='str'), user_by_email=dict(type='str'), view=dict( diff --git a/plugins/modules/gcp_cloudbuild_trigger.py b/plugins/modules/gcp_cloudbuild_trigger.py index f7d9510..c0a7a8d 100644 --- a/plugins/modules/gcp_cloudbuild_trigger.py +++ b/plugins/modules/gcp_cloudbuild_trigger.py @@ -109,7 +109,7 @@ options: - Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. - required: false + required: true type: dict suboptions: project_id: @@ -176,7 +176,7 @@ options: steps: description: - The operations to be performed on the workspace. - required: false + required: true type: list suboptions: name: @@ -194,7 +194,7 @@ options: - If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step. - required: false + required: true type: str args: description: @@ -274,14 +274,14 @@ options: - Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. - required: false + required: true type: str path: description: - Path at which to mount the volume. - Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. - required: false + required: true type: str wait_for: description: @@ -648,6 +648,7 @@ def main(): ignored_files=dict(type='list', elements='str'), included_files=dict(type='list', elements='str'), trigger_template=dict( + required=True, type='dict', options=dict( project_id=dict(type='str'), @@ -664,10 +665,11 @@ def main(): tags=dict(type='list', elements='str'), images=dict(type='list', elements='str'), steps=dict( + required=True, type='list', elements='dict', options=dict( - name=dict(type='str'), + name=dict(required=True, type='str'), args=dict(type='list', elements='str'), env=dict(type='list', elements='str'), id=dict(type='str'), @@ -676,14 +678,15 @@ def main(): secret_env=dict(type='list', elements='str'), timeout=dict(type='str'), timing=dict(type='str'), - volumes=dict(type='list', elements='dict', options=dict(name=dict(type='str'), path=dict(type='str'))), + volumes=dict( + type='list', elements='dict', options=dict(name=dict(required=True, type='str'), path=dict(required=True, type='str')) + ), wait_for=dict(type='list', elements='str'), ), ), ), ), - ), - mutually_exclusive=[['build', 'filename']], + ) ) if not module.params['scopes']: diff --git a/plugins/modules/gcp_cloudfunctions_cloud_function.py b/plugins/modules/gcp_cloudfunctions_cloud_function.py index e3db267..cf58cb6 100644 --- a/plugins/modules/gcp_cloudfunctions_cloud_function.py +++ b/plugins/modules/gcp_cloudfunctions_cloud_function.py @@ -117,7 +117,7 @@ options: description: - The URL pointing to the hosted repository where the function is defined . - required: false + required: true type: str https_trigger: description: @@ -392,7 +392,7 @@ def main(): environment_variables=dict(type='dict'), source_archive_url=dict(type='str'), source_upload_url=dict(type='str'), - source_repository=dict(type='dict', options=dict(url=dict(type='str'))), + source_repository=dict(type='dict', options=dict(url=dict(required=True, type='str'))), https_trigger=dict(type='dict', options=dict()), event_trigger=dict( type='dict', options=dict(event_type=dict(required=True, type='str'), resource=dict(required=True, type='str'), service=dict(type='str')) diff --git a/plugins/modules/gcp_cloudscheduler_job.py b/plugins/modules/gcp_cloudscheduler_job.py index 360a933..a54e0c2 100644 --- a/plugins/modules/gcp_cloudscheduler_job.py +++ b/plugins/modules/gcp_cloudscheduler_job.py @@ -246,7 +246,7 @@ options: description: - Service account email to be used for generating OAuth token. - The service account must be within the same project as the job. - required: false + required: true type: str scope: description: @@ -266,7 +266,7 @@ options: description: - Service account email to be used for generating OAuth token. - The service account must be within the same project as the job. - required: false + required: true type: str audience: description: @@ -636,13 +636,12 @@ def main(): http_method=dict(type='str'), body=dict(type='str'), headers=dict(type='dict'), - oauth_token=dict(type='dict', options=dict(service_account_email=dict(type='str'), scope=dict(type='str'))), - oidc_token=dict(type='dict', options=dict(service_account_email=dict(type='str'), audience=dict(type='str'))), + oauth_token=dict(type='dict', options=dict(service_account_email=dict(required=True, type='str'), scope=dict(type='str'))), + oidc_token=dict(type='dict', options=dict(service_account_email=dict(required=True, type='str'), audience=dict(type='str'))), ), ), region=dict(required=True, type='str'), - ), - mutually_exclusive=[['app_engine_http_target', 'http_target', 'pubsub_target']], + ) ) if not module.params['scopes']: diff --git a/plugins/modules/gcp_compute_backend_bucket.py b/plugins/modules/gcp_compute_backend_bucket.py index af0374b..fa77477 100644 --- a/plugins/modules/gcp_compute_backend_bucket.py +++ b/plugins/modules/gcp_compute_backend_bucket.py @@ -67,14 +67,13 @@ options: signed_url_cache_max_age_sec: description: - Maximum number of seconds the response to a signed URL request will be considered - fresh. Defaults to 1hr (3600s). After this time period, the response will - be revalidated before being served. + fresh. After this time period, the response will be revalidated before being + served. - 'When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.' - required: false - default: '3600' + required: true type: int description: description: @@ -186,8 +185,8 @@ cdnPolicy: signedUrlCacheMaxAgeSec: description: - Maximum number of seconds the response to a signed URL request will be considered - fresh. Defaults to 1hr (3600s). After this time period, the response will - be revalidated before being served. + fresh. After this time period, the response will be revalidated before being + served. - 'When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The @@ -254,7 +253,7 @@ def main(): argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), bucket_name=dict(required=True, type='str'), - cdn_policy=dict(type='dict', options=dict(signed_url_cache_max_age_sec=dict(default=3600, type='int'))), + cdn_policy=dict(type='dict', options=dict(signed_url_cache_max_age_sec=dict(required=True, type='int'))), description=dict(type='str'), enable_cdn=dict(type='bool'), name=dict(required=True, type='str'), diff --git a/plugins/modules/gcp_compute_backend_bucket_info.py b/plugins/modules/gcp_compute_backend_bucket_info.py index 7b1e2fa..1e6bc96 100644 --- a/plugins/modules/gcp_compute_backend_bucket_info.py +++ b/plugins/modules/gcp_compute_backend_bucket_info.py @@ -126,8 +126,8 @@ resources: signedUrlCacheMaxAgeSec: description: - Maximum number of seconds the response to a signed URL request will be - considered fresh. Defaults to 1hr (3600s). After this time period, the - response will be revalidated before being served. + considered fresh. After this time period, the response will be revalidated + before being served. - 'When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control diff --git a/plugins/modules/gcp_compute_backend_service.py b/plugins/modules/gcp_compute_backend_service.py index a2691a8..da1a8ff 100644 --- a/plugins/modules/gcp_compute_backend_service.py +++ b/plugins/modules/gcp_compute_backend_service.py @@ -105,7 +105,7 @@ options: - Backend services cannot mix Instance Group and Network Endpoint Group backends. - Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. - required: false + required: true type: str max_connections: description: @@ -750,7 +750,7 @@ def main(): balancing_mode=dict(default='UTILIZATION', type='str'), capacity_scaler=dict(default=1.0, type='str'), description=dict(type='str'), - group=dict(type='str'), + group=dict(required=True, type='str'), max_connections=dict(type='int'), max_connections_per_instance=dict(type='int'), max_connections_per_endpoint=dict(type='int'), diff --git a/plugins/modules/gcp_compute_firewall.py b/plugins/modules/gcp_compute_firewall.py index 2b0607d..185333a 100644 --- a/plugins/modules/gcp_compute_firewall.py +++ b/plugins/modules/gcp_compute_firewall.py @@ -512,7 +512,6 @@ def main(): target_tags=dict(type='list', elements='str'), ), mutually_exclusive=[ - ['allowed', 'denied'], ['destination_ranges', 'source_ranges', 'source_tags'], ['destination_ranges', 'source_ranges'], ['source_service_accounts', 'source_tags', 'target_tags'], diff --git a/plugins/modules/gcp_compute_forwarding_rule.py b/plugins/modules/gcp_compute_forwarding_rule.py index 8280efb..ba5c42d 100644 --- a/plugins/modules/gcp_compute_forwarding_rule.py +++ b/plugins/modules/gcp_compute_forwarding_rule.py @@ -98,12 +98,6 @@ options: field to "{{ name-of-resource }}"' required: false type: dict - ip_version: - description: - - ipVersion is not a valid field for regional forwarding rules. - - 'Some valid choices include: "IPV4", "IPV6"' - required: false - type: str load_balancing_scheme: description: - This signifies what the ForwardingRule will be used for and can be EXTERNAL, @@ -367,11 +361,6 @@ backendService: load balancing. returned: success type: dict -ipVersion: - description: - - ipVersion is not a valid field for regional forwarding rules. - returned: success - type: str loadBalancingScheme: description: - This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL, @@ -504,7 +493,6 @@ def main(): ip_address=dict(type='str'), ip_protocol=dict(type='str'), backend_service=dict(type='dict'), - ip_version=dict(type='str'), load_balancing_scheme=dict(type='str'), name=dict(required=True, type='str'), network=dict(type='dict'), @@ -585,7 +573,6 @@ def resource_to_request(module): u'IPAddress': module.params.get('ip_address'), u'IPProtocol': module.params.get('ip_protocol'), u'backendService': replace_resource_dict(module.params.get(u'backend_service', {}), 'selfLink'), - u'ipVersion': module.params.get('ip_version'), u'loadBalancingScheme': module.params.get('load_balancing_scheme'), u'name': module.params.get('name'), u'network': replace_resource_dict(module.params.get(u'network', {}), 'selfLink'), @@ -667,7 +654,6 @@ def response_to_hash(module, response): u'IPAddress': response.get(u'IPAddress'), u'IPProtocol': response.get(u'IPProtocol'), u'backendService': response.get(u'backendService'), - u'ipVersion': response.get(u'ipVersion'), u'loadBalancingScheme': response.get(u'loadBalancingScheme'), u'name': response.get(u'name'), u'network': response.get(u'network'), diff --git a/plugins/modules/gcp_compute_forwarding_rule_info.py b/plugins/modules/gcp_compute_forwarding_rule_info.py index dae87fa..ab7601c 100644 --- a/plugins/modules/gcp_compute_forwarding_rule_info.py +++ b/plugins/modules/gcp_compute_forwarding_rule_info.py @@ -171,11 +171,6 @@ resources: load balancing. returned: success type: dict - ipVersion: - description: - - ipVersion is not a valid field for regional forwarding rules. - returned: success - type: str loadBalancingScheme: description: - This signifies what the ForwardingRule will be used for and can be EXTERNAL, diff --git a/plugins/modules/gcp_compute_health_check.py b/plugins/modules/gcp_compute_health_check.py index 2c04233..b710295 100644 --- a/plugins/modules/gcp_compute_health_check.py +++ b/plugins/modules/gcp_compute_health_check.py @@ -895,8 +895,7 @@ def main(): port_specification=dict(type='str'), ), ), - ), - mutually_exclusive=[['http2_health_check', 'http_health_check', 'https_health_check', 'ssl_health_check', 'tcp_health_check']], + ) ) if not module.params['scopes']: diff --git a/plugins/modules/gcp_compute_image.py b/plugins/modules/gcp_compute_image.py index f61eb9c..f798a42 100644 --- a/plugins/modules/gcp_compute_image.py +++ b/plugins/modules/gcp_compute_image.py @@ -89,7 +89,7 @@ options: - The type of supported feature. - 'Some valid choices include: "MULTI_IP_SUBNET", "SECURE_BOOT", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS"' - required: false + required: true type: str image_encryption_key: description: @@ -496,7 +496,7 @@ def main(): description=dict(type='str'), disk_size_gb=dict(type='int'), family=dict(type='str'), - guest_os_features=dict(type='list', elements='dict', options=dict(type=dict(type='str'))), + guest_os_features=dict(type='list', elements='dict', options=dict(type=dict(required=True, type='str'))), image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))), labels=dict(type='dict'), licenses=dict(type='list', elements='str'), diff --git a/plugins/modules/gcp_compute_network.py b/plugins/modules/gcp_compute_network.py index b2dd6a0..7a3f030 100644 --- a/plugins/modules/gcp_compute_network.py +++ b/plugins/modules/gcp_compute_network.py @@ -54,17 +54,6 @@ options: modify this field. required: false type: str - ipv4_range: - description: - - If this field is specified, a deprecated legacy network is created. - - You will no longer be able to create a legacy network on Feb 1, 2020. - - See the [legacy network docs](U(https://cloud.google.com/vpc/docs/legacy)) for - more details. - - The range of internal addresses that are legal on this legacy network. - - 'This range is a CIDR specification, for example: `192.168.0.0/16`.' - - The resource must be recreated to modify this field. - required: false - type: str name: description: - Name of the resource. Provided by the client when the resource is created. The @@ -183,17 +172,6 @@ id: - The unique identifier for the resource. returned: success type: int -ipv4_range: - description: - - If this field is specified, a deprecated legacy network is created. - - You will no longer be able to create a legacy network on Feb 1, 2020. - - See the [legacy network docs](U(https://cloud.google.com/vpc/docs/legacy)) for - more details. - - The range of internal addresses that are legal on this legacy network. - - 'This range is a CIDR specification, for example: `192.168.0.0/16`.' - - The resource must be recreated to modify this field. - returned: success - type: str name: description: - Name of the resource. Provided by the client when the resource is created. The @@ -267,12 +245,10 @@ def main(): argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), description=dict(type='str'), - ipv4_range=dict(type='str'), name=dict(required=True, type='str'), auto_create_subnetworks=dict(type='bool'), routing_config=dict(type='dict', options=dict(routing_mode=dict(required=True, type='str'))), - ), - mutually_exclusive=[['auto_create_subnetworks', 'ipv4_range']], + ) ) if not module.params['scopes']: @@ -338,7 +314,6 @@ def resource_to_request(module): request = { u'kind': 'compute#network', u'description': module.params.get('description'), - u'IPv4Range': module.params.get('ipv4_range'), u'name': module.params.get('name'), u'autoCreateSubnetworks': module.params.get('auto_create_subnetworks'), u'routingConfig': NetworkRoutingconfig(module.params.get('routing_config', {}), module).to_request(), @@ -410,7 +385,6 @@ def response_to_hash(module, response): u'description': module.params.get('description'), u'gatewayIPv4': response.get(u'gatewayIPv4'), u'id': response.get(u'id'), - u'IPv4Range': module.params.get('ipv4_range'), u'name': module.params.get('name'), u'subnetworks': response.get(u'subnetworks'), u'autoCreateSubnetworks': module.params.get('auto_create_subnetworks'), diff --git a/plugins/modules/gcp_compute_network_info.py b/plugins/modules/gcp_compute_network_info.py index 8c20b34..5de6884 100644 --- a/plugins/modules/gcp_compute_network_info.py +++ b/plugins/modules/gcp_compute_network_info.py @@ -129,17 +129,6 @@ resources: - The unique identifier for the resource. returned: success type: int - ipv4_range: - description: - - If this field is specified, a deprecated legacy network is created. - - You will no longer be able to create a legacy network on Feb 1, 2020. - - See the [legacy network docs](U(https://cloud.google.com/vpc/docs/legacy)) - for more details. - - The range of internal addresses that are legal on this legacy network. - - 'This range is a CIDR specification, for example: `192.168.0.0/16`.' - - The resource must be recreated to modify this field. - returned: success - type: str name: description: - Name of the resource. Provided by the client when the resource is created. diff --git a/plugins/modules/gcp_compute_route.py b/plugins/modules/gcp_compute_route.py index 041100c..24b903d 100644 --- a/plugins/modules/gcp_compute_route.py +++ b/plugins/modules/gcp_compute_route.py @@ -46,7 +46,7 @@ description: gateway. Packets that do not match any route in the sending virtual machine's routing table will be dropped. - A Route resource must have exactly one specification of either nextHopGateway, nextHopInstance, - nextHopIp, or nextHopVpnTunnel. + nextHopIp, nextHopVpnTunnel, or nextHopIlb. short_description: Creates a GCP Route version_added: '2.6' author: Google Inc. (@googlecloudplatform) diff --git a/plugins/modules/gcp_compute_router.py b/plugins/modules/gcp_compute_router.py index 26509b7..5cdb3eb 100644 --- a/plugins/modules/gcp_compute_router.py +++ b/plugins/modules/gcp_compute_router.py @@ -116,7 +116,7 @@ options: range: description: - The IP range to advertise. The value must be a CIDR-formatted string. - required: false + required: true type: str description: description: @@ -329,7 +329,7 @@ def main(): asn=dict(required=True, type='int'), advertise_mode=dict(default='DEFAULT', type='str'), advertised_groups=dict(type='list', elements='str'), - advertised_ip_ranges=dict(type='list', elements='dict', options=dict(range=dict(type='str'), description=dict(type='str'))), + advertised_ip_ranges=dict(type='list', elements='dict', options=dict(range=dict(required=True, type='str'), description=dict(type='str'))), ), ), region=dict(required=True, type='str'), diff --git a/plugins/modules/gcp_compute_subnetwork.py b/plugins/modules/gcp_compute_subnetwork.py index a8e8bea..871d13b 100644 --- a/plugins/modules/gcp_compute_subnetwork.py +++ b/plugins/modules/gcp_compute_subnetwork.py @@ -99,12 +99,6 @@ options: }}"' required: true type: dict - enable_flow_logs: - description: - - Whether to enable flow logging for this subnetwork. - required: false - type: bool - version_added: '2.8' secondary_ip_ranges: description: - An array of configurations for secondary IP ranges for VM instances contained @@ -263,11 +257,6 @@ network: - Only networks that are in the distributed mode can have subnetworks. returned: success type: dict -enableFlowLogs: - description: - - Whether to enable flow logging for this subnetwork. - returned: success - type: bool fingerprint: description: - Fingerprint of this resource. This field is used internally during updates of @@ -340,7 +329,6 @@ def main(): ip_cidr_range=dict(required=True, type='str'), name=dict(required=True, type='str'), network=dict(required=True, type='dict'), - enable_flow_logs=dict(type='bool'), secondary_ip_ranges=dict( type='list', elements='dict', options=dict(range_name=dict(required=True, type='str'), ip_cidr_range=dict(required=True, type='str')) ), @@ -393,8 +381,8 @@ def update(module, link, kind, fetch): def update_fields(module, request, response): if response.get('ipCidrRange') != request.get('ipCidrRange'): ip_cidr_range_update(module, request, response) - if response.get('enableFlowLogs') != request.get('enableFlowLogs') or response.get('secondaryIpRanges') != request.get('secondaryIpRanges'): - enable_flow_logs_update(module, request, response) + if response.get('secondaryIpRanges') != request.get('secondaryIpRanges'): + fingerprint_update(module, request, response) if response.get('privateIpGoogleAccess') != request.get('privateIpGoogleAccess'): private_ip_google_access_update(module, request, response) @@ -407,12 +395,11 @@ def ip_cidr_range_update(module, request, response): ) -def enable_flow_logs_update(module, request, response): +def fingerprint_update(module, request, response): auth = GcpSession(module, 'compute') auth.patch( ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}"]).format(**module.params), { - u'enableFlowLogs': module.params.get('enable_flow_logs'), u'fingerprint': response.get('fingerprint'), u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(module.params.get('secondary_ip_ranges', []), module).to_request(), }, @@ -441,7 +428,6 @@ def resource_to_request(module): u'ipCidrRange': module.params.get('ip_cidr_range'), u'name': module.params.get('name'), u'network': replace_resource_dict(module.params.get(u'network', {}), 'selfLink'), - u'enableFlowLogs': module.params.get('enable_flow_logs'), u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(module.params.get('secondary_ip_ranges', []), module).to_request(), u'privateIpGoogleAccess': module.params.get('private_ip_google_access'), u'region': module.params.get('region'), @@ -517,7 +503,6 @@ def response_to_hash(module, response): u'ipCidrRange': response.get(u'ipCidrRange'), u'name': response.get(u'name'), u'network': replace_resource_dict(module.params.get(u'network', {}), 'selfLink'), - u'enableFlowLogs': response.get(u'enableFlowLogs'), u'fingerprint': response.get(u'fingerprint'), u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(response.get(u'secondaryIpRanges', []), module).from_response(), u'privateIpGoogleAccess': response.get(u'privateIpGoogleAccess'), diff --git a/plugins/modules/gcp_compute_subnetwork_info.py b/plugins/modules/gcp_compute_subnetwork_info.py index f423718..149d653 100644 --- a/plugins/modules/gcp_compute_subnetwork_info.py +++ b/plugins/modules/gcp_compute_subnetwork_info.py @@ -164,11 +164,6 @@ resources: - Only networks that are in the distributed mode can have subnetworks. returned: success type: dict - enableFlowLogs: - description: - - Whether to enable flow logging for this subnetwork. - returned: success - type: bool fingerprint: description: - Fingerprint of this resource. This field is used internally during updates diff --git a/plugins/modules/gcp_dns_managed_zone.py b/plugins/modules/gcp_dns_managed_zone.py index 1861c7f..4f3b8c4 100644 --- a/plugins/modules/gcp_dns_managed_zone.py +++ b/plugins/modules/gcp_dns_managed_zone.py @@ -162,7 +162,7 @@ options: networks: description: - The list of VPC networks that can see this zone. - required: false + required: true type: list suboptions: network_url: @@ -170,7 +170,7 @@ options: - The fully qualified URL of the VPC network to bind to. - This should be formatted like `U(https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`) . - required: false + required: true type: str project: description: @@ -412,7 +412,9 @@ def main(): name_server_set=dict(type='str'), labels=dict(type='dict'), visibility=dict(default='public', type='str'), - private_visibility_config=dict(type='dict', options=dict(networks=dict(type='list', elements='dict', options=dict(network_url=dict(type='str'))))), + private_visibility_config=dict( + type='dict', options=dict(networks=dict(required=True, type='list', elements='dict', options=dict(network_url=dict(required=True, type='str')))) + ), ) ) diff --git a/plugins/modules/gcp_logging_metric.py b/plugins/modules/gcp_logging_metric.py index 180c482..e754b34 100644 --- a/plugins/modules/gcp_logging_metric.py +++ b/plugins/modules/gcp_logging_metric.py @@ -223,7 +223,7 @@ options: bounds: description: - The values must be monotonically increasing. - required: false + required: true type: list project: description: @@ -527,7 +527,7 @@ def main(): exponential_buckets=dict( type='dict', options=dict(num_finite_buckets=dict(type='int'), growth_factor=dict(type='int'), scale=dict(type='str')) ), - explicit_buckets=dict(type='dict', options=dict(bounds=dict(type='list', elements='str'))), + explicit_buckets=dict(type='dict', options=dict(bounds=dict(required=True, type='list', elements='str'))), ), ), ) diff --git a/plugins/modules/gcp_mlengine_model.py b/plugins/modules/gcp_mlengine_model.py index 8c421ae..5a426ed 100644 --- a/plugins/modules/gcp_mlengine_model.py +++ b/plugins/modules/gcp_mlengine_model.py @@ -70,7 +70,7 @@ options: name: description: - The name specified for the version when it was created. - required: false + required: true type: str regions: description: @@ -221,7 +221,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), name=dict(required=True, type='str'), description=dict(type='str'), - default_version=dict(type='dict', options=dict(name=dict(type='str'))), + default_version=dict(type='dict', options=dict(name=dict(required=True, type='str'))), regions=dict(type='list', elements='str'), online_prediction_logging=dict(type='bool'), online_prediction_console_logging=dict(type='bool'), diff --git a/plugins/modules/gcp_pubsub_subscription.py b/plugins/modules/gcp_pubsub_subscription.py index 7cad060..837d815 100644 --- a/plugins/modules/gcp_pubsub_subscription.py +++ b/plugins/modules/gcp_pubsub_subscription.py @@ -175,7 +175,7 @@ options: - A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be - used. If it is set but left empty, the resource never expires. The minimum allowed + used. If it is set but ttl is "", the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. required: false type: dict @@ -188,7 +188,7 @@ options: - If ttl is not set, the associated resource never expires. - A duration in seconds with up to nine fractional digits, terminated by 's'. - Example - "3.5s". - required: false + required: true type: str project: description: @@ -379,7 +379,7 @@ expirationPolicy: - A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. - If it is set but left empty, the resource never expires. The minimum allowed value + If it is set but ttl is "", the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. returned: success type: complex @@ -435,7 +435,7 @@ def main(): ack_deadline_seconds=dict(type='int'), message_retention_duration=dict(default='604800s', type='str'), retain_acked_messages=dict(type='bool'), - expiration_policy=dict(type='dict', options=dict(ttl=dict(type='str'))), + expiration_policy=dict(type='dict', options=dict(ttl=dict(required=True, type='str'))), ) ) diff --git a/plugins/modules/gcp_pubsub_subscription_info.py b/plugins/modules/gcp_pubsub_subscription_info.py index 64136e2..3281b0c 100644 --- a/plugins/modules/gcp_pubsub_subscription_info.py +++ b/plugins/modules/gcp_pubsub_subscription_info.py @@ -221,7 +221,7 @@ resources: - A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with - ttl of 31 days will be used. If it is set but left empty, the resource never + ttl of 31 days will be used. If it is set but ttl is "", the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. returned: success type: complex diff --git a/plugins/modules/gcp_tpu_node.py b/plugins/modules/gcp_tpu_node.py index 3b6c10f..799ffa4 100644 --- a/plugins/modules/gcp_tpu_node.py +++ b/plugins/modules/gcp_tpu_node.py @@ -96,8 +96,7 @@ options: preemptible: description: - Defines whether the TPU instance is preemptible. - required: false - default: 'false' + required: true type: bool labels: description: @@ -294,7 +293,7 @@ def main(): tensorflow_version=dict(required=True, type='str'), network=dict(type='str'), cidr_block=dict(required=True, type='str'), - scheduling_config=dict(type='dict', options=dict(preemptible=dict(type='bool'))), + scheduling_config=dict(type='dict', options=dict(preemptible=dict(required=True, type='bool'))), labels=dict(type='dict'), zone=dict(required=True, type='str'), )