From c62d8265641cca0597796d00fcdb45fb0935ae71 Mon Sep 17 00:00:00 2001 From: The Magician Date: Thu, 6 Aug 2020 07:23:16 -0700 Subject: [PATCH 01/11] Make `iap` field computed (#3814) (#272) Signed-off-by: Modular Magician --- plugins/module_utils/gcp_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/module_utils/gcp_utils.py b/plugins/module_utils/gcp_utils.py index 643c8ca58..20256fa2d 100644 --- a/plugins/module_utils/gcp_utils.py +++ b/plugins/module_utils/gcp_utils.py @@ -288,8 +288,7 @@ def __init__(self, *args, **kwargs): scopes=dict( required=False, fallback=(env_fallback, ['GCP_SCOPES']), - type='list', - elements='str'), + type='list'), env_type=dict( required=False, fallback=(env_fallback, ['GCP_ENV_TYPE']), From 791e7253bbdfe265b653b46b1566c3431ae32e39 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 7 Aug 2020 11:43:33 -0700 Subject: [PATCH 02/11] add source_image and source_snapshot to google_compute_image (#3799) (#273) * add source_image to google_compute_image * add source_snapshot to google_compute_image * PR comment changes Signed-off-by: Modular Magician --- plugins/modules/gcp_compute_image.py | 48 +++++++++++++++++++++++ plugins/modules/gcp_compute_image_info.py | 15 +++++++ 2 files changed, 63 insertions(+) diff --git a/plugins/modules/gcp_compute_image.py b/plugins/modules/gcp_compute_image.py index d4a78528c..1d8621113 100644 --- a/plugins/modules/gcp_compute_image.py +++ b/plugins/modules/gcp_compute_image.py @@ -186,6 +186,33 @@ of a given disk name. required: false type: str + source_image: + description: + - 'URL of the source image used to create this image. In order to create an image, + you must provide the full or partial URL of one of the following: The selfLink + URL This property The rawDisk.source URL The sourceDisk URL .' + - 'This field represents a link to a Image resource in GCP. It can be specified + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_image task and then set this source_image field to "{{ name-of-resource + }}"' + required: false + type: dict + version_added: '2.10' + source_snapshot: + description: + - URL of the source snapshot used to create this image. + - 'In order to create an image, you must provide the full or partial URL of one + of the following: The selfLink URL This property The sourceImage URL The rawDisk.source + URL The sourceDisk URL .' + - 'This field represents a link to a Snapshot resource in GCP. It can be specified + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_snapshot task and then set this source_snapshot field to "{{ + name-of-resource }}"' + required: false + type: dict + version_added: '2.10' source_type: description: - The type of the image used to create this disk. The default and only value is @@ -460,6 +487,21 @@ of a given disk name. returned: success type: str +sourceImage: + description: + - 'URL of the source image used to create this image. In order to create an image, + you must provide the full or partial URL of one of the following: The selfLink + URL This property The rawDisk.source URL The sourceDisk URL .' + returned: success + type: dict +sourceSnapshot: + description: + - URL of the source snapshot used to create this image. + - 'In order to create an image, you must provide the full or partial URL of one + of the following: The selfLink URL This property The sourceImage URL The rawDisk.source + URL The sourceDisk URL .' + returned: success + type: dict sourceType: description: - The type of the image used to create this disk. The default and only value is @@ -507,6 +549,8 @@ def main(): source_disk=dict(type='dict'), source_disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))), source_disk_id=dict(type='str'), + source_image=dict(type='dict'), + source_snapshot=dict(type='dict'), source_type=dict(type='str'), ) ) @@ -585,6 +629,8 @@ def resource_to_request(module): u'sourceDisk': replace_resource_dict(module.params.get(u'source_disk', {}), 'selfLink'), u'sourceDiskEncryptionKey': ImageSourcediskencryptionkey(module.params.get('source_disk_encryption_key', {}), module).to_request(), u'sourceDiskId': module.params.get('source_disk_id'), + u'sourceImage': replace_resource_dict(module.params.get(u'source_image', {}), 'selfLink'), + u'sourceSnapshot': replace_resource_dict(module.params.get(u'source_snapshot', {}), 'selfLink'), u'sourceType': module.params.get('source_type'), } return_vals = {} @@ -668,6 +714,8 @@ def response_to_hash(module, response): u'sourceDisk': response.get(u'sourceDisk'), u'sourceDiskEncryptionKey': ImageSourcediskencryptionkey(response.get(u'sourceDiskEncryptionKey', {}), module).from_response(), u'sourceDiskId': response.get(u'sourceDiskId'), + u'sourceImage': response.get(u'sourceImage'), + u'sourceSnapshot': response.get(u'sourceSnapshot'), u'sourceType': response.get(u'sourceType'), } diff --git a/plugins/modules/gcp_compute_image_info.py b/plugins/modules/gcp_compute_image_info.py index 729b034b4..66bbd7aed 100644 --- a/plugins/modules/gcp_compute_image_info.py +++ b/plugins/modules/gcp_compute_image_info.py @@ -307,6 +307,21 @@ of a given disk name. returned: success type: str + sourceImage: + description: + - 'URL of the source image used to create this image. In order to create an + image, you must provide the full or partial URL of one of the following: The + selfLink URL This property The rawDisk.source URL The sourceDisk URL .' + returned: success + type: dict + sourceSnapshot: + description: + - URL of the source snapshot used to create this image. + - 'In order to create an image, you must provide the full or partial URL of + one of the following: The selfLink URL This property The sourceImage URL The + rawDisk.source URL The sourceDisk URL .' + returned: success + type: dict sourceType: description: - The type of the image used to create this disk. The default and only value From a6df4321e2b66943337711f41700544cf834c425 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 10 Aug 2020 13:42:15 -0700 Subject: [PATCH 03/11] Collection fixes for release (#3831) (#274) Signed-off-by: Modular Magician --- plugins/module_utils/gcp_utils.py | 3 ++- .../modules/gcp_appengine_firewall_rule.py | 2 +- .../gcp_appengine_firewall_rule_info.py | 4 +-- plugins/modules/gcp_bigquery_dataset.py | 4 +-- plugins/modules/gcp_bigquery_dataset_info.py | 4 +-- plugins/modules/gcp_bigquery_table.py | 5 +--- plugins/modules/gcp_bigquery_table_info.py | 4 +-- plugins/modules/gcp_bigtable_instance.py | 2 +- plugins/modules/gcp_bigtable_instance_info.py | 4 +-- plugins/modules/gcp_cloudbuild_trigger.py | 11 +------- .../modules/gcp_cloudbuild_trigger_info.py | 4 +-- .../gcp_cloudfunctions_cloud_function.py | 2 +- .../gcp_cloudfunctions_cloud_function_info.py | 4 +-- plugins/modules/gcp_cloudscheduler_job.py | 2 +- .../modules/gcp_cloudscheduler_job_info.py | 4 +-- plugins/modules/gcp_cloudtasks_queue.py | 2 +- plugins/modules/gcp_cloudtasks_queue_info.py | 4 +-- plugins/modules/gcp_compute_address.py | 6 +---- plugins/modules/gcp_compute_address_info.py | 5 ++-- plugins/modules/gcp_compute_autoscaler.py | 3 +-- .../modules/gcp_compute_autoscaler_info.py | 5 ++-- plugins/modules/gcp_compute_backend_bucket.py | 3 +-- .../gcp_compute_backend_bucket_info.py | 5 ++-- .../modules/gcp_compute_backend_service.py | 14 +--------- .../gcp_compute_backend_service_info.py | 5 ++-- plugins/modules/gcp_compute_disk.py | 5 +--- plugins/modules/gcp_compute_disk_info.py | 5 ++-- .../gcp_compute_external_vpn_gateway.py | 6 ++--- .../gcp_compute_external_vpn_gateway_info.py | 7 ++--- plugins/modules/gcp_compute_firewall.py | 10 +------ plugins/modules/gcp_compute_firewall_info.py | 5 ++-- .../modules/gcp_compute_forwarding_rule.py | 7 +---- .../gcp_compute_forwarding_rule_info.py | 5 ++-- plugins/modules/gcp_compute_global_address.py | 7 +---- .../gcp_compute_global_address_info.py | 5 ++-- .../gcp_compute_global_forwarding_rule.py | 3 +-- ...gcp_compute_global_forwarding_rule_info.py | 5 ++-- plugins/modules/gcp_compute_health_check.py | 7 +---- .../modules/gcp_compute_health_check_info.py | 5 ++-- .../modules/gcp_compute_http_health_check.py | 2 +- .../gcp_compute_http_health_check_info.py | 5 ++-- .../modules/gcp_compute_https_health_check.py | 2 +- .../gcp_compute_https_health_check_info.py | 5 ++-- plugins/modules/gcp_compute_image.py | 5 +--- plugins/modules/gcp_compute_image_info.py | 5 ++-- plugins/modules/gcp_compute_instance.py | 10 +------ plugins/modules/gcp_compute_instance_group.py | 3 +-- .../gcp_compute_instance_group_info.py | 5 ++-- .../gcp_compute_instance_group_manager.py | 2 +- ...gcp_compute_instance_group_manager_info.py | 5 ++-- plugins/modules/gcp_compute_instance_info.py | 5 ++-- .../modules/gcp_compute_instance_template.py | 6 +---- .../gcp_compute_instance_template_info.py | 5 ++-- .../gcp_compute_interconnect_attachment.py | 4 +-- ...cp_compute_interconnect_attachment_info.py | 5 ++-- plugins/modules/gcp_compute_network.py | 3 +-- .../gcp_compute_network_endpoint_group.py | 2 +- ...gcp_compute_network_endpoint_group_info.py | 5 ++-- plugins/modules/gcp_compute_network_info.py | 5 ++-- plugins/modules/gcp_compute_node_group.py | 2 +- .../modules/gcp_compute_node_group_info.py | 5 ++-- plugins/modules/gcp_compute_node_template.py | 2 +- .../modules/gcp_compute_node_template_info.py | 5 ++-- .../modules/gcp_compute_region_autoscaler.py | 2 +- .../gcp_compute_region_autoscaler_info.py | 5 ++-- .../gcp_compute_region_backend_service.py | 2 +- ...gcp_compute_region_backend_service_info.py | 5 ++-- plugins/modules/gcp_compute_region_disk.py | 2 +- .../modules/gcp_compute_region_disk_info.py | 5 ++-- .../gcp_compute_region_health_check.py | 2 +- .../gcp_compute_region_health_check_info.py | 5 ++-- ...p_compute_region_instance_group_manager.py | 2 +- ...pute_region_instance_group_manager_info.py | 5 ++-- .../gcp_compute_region_target_http_proxy.py | 2 +- ...p_compute_region_target_http_proxy_info.py | 5 ++-- .../gcp_compute_region_target_https_proxy.py | 2 +- ..._compute_region_target_https_proxy_info.py | 5 ++-- plugins/modules/gcp_compute_region_url_map.py | 2 +- .../gcp_compute_region_url_map_info.py | 5 ++-- plugins/modules/gcp_compute_reservation.py | 2 +- .../modules/gcp_compute_reservation_info.py | 5 ++-- .../modules/gcp_compute_resource_policy.py | 2 +- .../gcp_compute_resource_policy_info.py | 5 ++-- plugins/modules/gcp_compute_route.py | 4 +-- plugins/modules/gcp_compute_route_info.py | 5 ++-- plugins/modules/gcp_compute_router.py | 2 +- plugins/modules/gcp_compute_router_info.py | 5 ++-- plugins/modules/gcp_compute_snapshot.py | 2 +- plugins/modules/gcp_compute_snapshot_info.py | 5 ++-- .../modules/gcp_compute_ssl_certificate.py | 2 +- .../gcp_compute_ssl_certificate_info.py | 5 ++-- plugins/modules/gcp_compute_ssl_policy.py | 2 +- .../modules/gcp_compute_ssl_policy_info.py | 5 ++-- plugins/modules/gcp_compute_subnetwork.py | 3 +-- .../modules/gcp_compute_subnetwork_info.py | 5 ++-- .../modules/gcp_compute_target_http_proxy.py | 2 +- .../gcp_compute_target_http_proxy_info.py | 5 ++-- .../modules/gcp_compute_target_https_proxy.py | 4 +-- .../gcp_compute_target_https_proxy_info.py | 5 ++-- .../modules/gcp_compute_target_instance.py | 2 +- .../gcp_compute_target_instance_info.py | 5 ++-- plugins/modules/gcp_compute_target_pool.py | 2 +- .../modules/gcp_compute_target_pool_info.py | 5 ++-- .../modules/gcp_compute_target_ssl_proxy.py | 3 +-- .../gcp_compute_target_ssl_proxy_info.py | 5 ++-- .../modules/gcp_compute_target_tcp_proxy.py | 2 +- .../gcp_compute_target_tcp_proxy_info.py | 5 ++-- .../modules/gcp_compute_target_vpn_gateway.py | 2 +- .../gcp_compute_target_vpn_gateway_info.py | 5 ++-- plugins/modules/gcp_compute_url_map.py | 11 +------- plugins/modules/gcp_compute_url_map_info.py | 5 ++-- plugins/modules/gcp_compute_vpn_tunnel.py | 2 +- .../modules/gcp_compute_vpn_tunnel_info.py | 5 ++-- plugins/modules/gcp_container_cluster.py | 27 ++----------------- plugins/modules/gcp_container_cluster_info.py | 5 ++-- plugins/modules/gcp_container_node_pool.py | 11 +------- .../modules/gcp_container_node_pool_info.py | 5 ++-- plugins/modules/gcp_dns_managed_zone.py | 8 +----- plugins/modules/gcp_dns_managed_zone_info.py | 5 ++-- .../modules/gcp_dns_resource_record_set.py | 2 +- .../gcp_dns_resource_record_set_info.py | 4 +-- plugins/modules/gcp_filestore_instance.py | 2 +- .../modules/gcp_filestore_instance_info.py | 4 +-- plugins/modules/gcp_iam_role.py | 2 +- plugins/modules/gcp_iam_role_info.py | 4 +-- plugins/modules/gcp_iam_service_account.py | 2 +- .../modules/gcp_iam_service_account_info.py | 4 +-- .../modules/gcp_iam_service_account_key.py | 4 +-- plugins/modules/gcp_kms_crypto_key.py | 2 +- plugins/modules/gcp_kms_crypto_key_info.py | 4 +-- plugins/modules/gcp_kms_key_ring.py | 2 +- plugins/modules/gcp_kms_key_ring_info.py | 4 +-- plugins/modules/gcp_logging_metric.py | 2 +- plugins/modules/gcp_logging_metric_info.py | 4 +-- plugins/modules/gcp_mlengine_model.py | 2 +- plugins/modules/gcp_mlengine_model_info.py | 4 +-- plugins/modules/gcp_mlengine_version.py | 2 +- plugins/modules/gcp_mlengine_version_info.py | 4 +-- plugins/modules/gcp_pubsub_subscription.py | 12 +++------ .../modules/gcp_pubsub_subscription_info.py | 6 ++--- plugins/modules/gcp_pubsub_topic.py | 5 +--- plugins/modules/gcp_pubsub_topic_info.py | 4 +-- plugins/modules/gcp_redis_instance.py | 3 +-- plugins/modules/gcp_redis_instance_info.py | 4 +-- .../modules/gcp_resourcemanager_project.py | 2 +- .../gcp_resourcemanager_project_info.py | 4 +-- plugins/modules/gcp_runtimeconfig_config.py | 2 +- .../modules/gcp_runtimeconfig_config_info.py | 4 +-- plugins/modules/gcp_runtimeconfig_variable.py | 2 +- .../gcp_runtimeconfig_variable_info.py | 4 +-- plugins/modules/gcp_serviceusage_service.py | 2 +- .../modules/gcp_serviceusage_service_info.py | 4 +-- plugins/modules/gcp_sourcerepo_repository.py | 2 +- .../modules/gcp_sourcerepo_repository_info.py | 4 +-- plugins/modules/gcp_spanner_database.py | 2 +- plugins/modules/gcp_spanner_database_info.py | 4 +-- plugins/modules/gcp_spanner_instance.py | 2 +- plugins/modules/gcp_spanner_instance_info.py | 4 +-- plugins/modules/gcp_sql_database.py | 2 +- plugins/modules/gcp_sql_database_info.py | 4 +-- plugins/modules/gcp_sql_instance.py | 6 +---- plugins/modules/gcp_sql_instance_info.py | 4 +-- plugins/modules/gcp_sql_ssl_cert.py | 2 +- plugins/modules/gcp_sql_user.py | 2 +- plugins/modules/gcp_sql_user_info.py | 4 +-- plugins/modules/gcp_storage_bucket.py | 5 +--- .../gcp_storage_bucket_access_control.py | 2 +- .../modules/gcp_storage_default_object_acl.py | 2 +- plugins/modules/gcp_tpu_node.py | 2 +- plugins/modules/gcp_tpu_node_info.py | 4 +-- 170 files changed, 310 insertions(+), 410 deletions(-) diff --git a/plugins/module_utils/gcp_utils.py b/plugins/module_utils/gcp_utils.py index 20256fa2d..643c8ca58 100644 --- a/plugins/module_utils/gcp_utils.py +++ b/plugins/module_utils/gcp_utils.py @@ -288,7 +288,8 @@ def __init__(self, *args, **kwargs): scopes=dict( required=False, fallback=(env_fallback, ['GCP_SCOPES']), - type='list'), + type='list', + elements='str'), env_type=dict( required=False, fallback=(env_fallback, ['GCP_ENV_TYPE']), diff --git a/plugins/modules/gcp_appengine_firewall_rule.py b/plugins/modules/gcp_appengine_firewall_rule.py index c34796620..01cd65af2 100644 --- a/plugins/modules/gcp_appengine_firewall_rule.py +++ b/plugins/modules/gcp_appengine_firewall_rule.py @@ -34,7 +34,6 @@ - A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests. short_description: Creates a GCP FirewallRule -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -106,6 +105,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_appengine_firewall_rule_info.py b/plugins/modules/gcp_appengine_firewall_rule_info.py index ef62652db..41b797f4d 100644 --- a/plugins/modules/gcp_appengine_firewall_rule_info.py +++ b/plugins/modules/gcp_appengine_firewall_rule_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP FirewallRule short_description: Gather info for GCP FirewallRule -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -134,7 +134,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_bigquery_dataset.py b/plugins/modules/gcp_bigquery_dataset.py index b881fd2a8..5d20042d1 100644 --- a/plugins/modules/gcp_bigquery_dataset.py +++ b/plugins/modules/gcp_bigquery_dataset.py @@ -33,7 +33,6 @@ description: - Datasets allow you to organize and control access to your tables. short_description: Creates a GCP Dataset -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -167,7 +166,6 @@ the default partition expiration time indicated by this property.' required: false type: int - version_added: '2.9' description: description: - A user-friendly description of the dataset. @@ -208,7 +206,6 @@ key. required: false type: dict - version_added: '2.10' suboptions: kms_key_name: description: @@ -248,6 +245,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_bigquery_dataset_info.py b/plugins/modules/gcp_bigquery_dataset_info.py index 901be7ed6..0590b0724 100644 --- a/plugins/modules/gcp_bigquery_dataset_info.py +++ b/plugins/modules/gcp_bigquery_dataset_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Dataset short_description: Gather info for GCP Dataset -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -298,7 +298,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_bigquery_table.py b/plugins/modules/gcp_bigquery_table.py index f14511385..6633719a6 100644 --- a/plugins/modules/gcp_bigquery_table.py +++ b/plugins/modules/gcp_bigquery_table.py @@ -33,7 +33,6 @@ description: - A Table that belongs to a Dataset . short_description: Creates a GCP Table -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -78,7 +77,6 @@ elements: str required: false type: list - version_added: '2.9' description: description: - A user-friendly description of the dataset. @@ -106,7 +104,6 @@ buffer. required: false type: int - version_added: '2.9' view: description: - The view definition. @@ -157,7 +154,6 @@ or REQUIRED. required: false type: str - version_added: '2.9' type: description: - The only type supported is DAY, which will generate one partition per day. @@ -497,6 +493,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_bigquery_table_info.py b/plugins/modules/gcp_bigquery_table_info.py index f01261768..7a5f7b614 100644 --- a/plugins/modules/gcp_bigquery_table_info.py +++ b/plugins/modules/gcp_bigquery_table_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Table short_description: Gather info for GCP Table -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -574,7 +574,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_bigtable_instance.py b/plugins/modules/gcp_bigtable_instance.py index 18d9bc23f..79ccf8cbc 100644 --- a/plugins/modules/gcp_bigtable_instance.py +++ b/plugins/modules/gcp_bigtable_instance.py @@ -34,7 +34,6 @@ - A collection of Bigtable Tables and the resources that serve them. All tables in an instance are served from all Clusters in the instance. short_description: Creates a GCP Instance -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -136,6 +135,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_bigtable_instance_info.py b/plugins/modules/gcp_bigtable_instance_info.py index 8a7b27619..16224e350 100644 --- a/plugins/modules/gcp_bigtable_instance_info.py +++ b/plugins/modules/gcp_bigtable_instance_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Instance short_description: Gather info for GCP Instance -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -172,7 +172,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_cloudbuild_trigger.py b/plugins/modules/gcp_cloudbuild_trigger.py index 918ae8ebd..2b56fa38d 100644 --- a/plugins/modules/gcp_cloudbuild_trigger.py +++ b/plugins/modules/gcp_cloudbuild_trigger.py @@ -33,7 +33,6 @@ description: - Configuration for an automated build in response to source repository changes. short_description: Creates a GCP Trigger -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -58,7 +57,6 @@ - Name of the trigger. Must be unique within the project. required: false type: str - version_added: '2.10' description: description: - Human-readable description of the trigger. @@ -70,7 +68,6 @@ elements: str required: false type: list - version_added: '2.10' disabled: description: - Whether the trigger is disabled or not. If true, the trigger will never result @@ -145,7 +142,6 @@ - Only trigger a build if the revision regex does NOT match the revision regex. required: false type: bool - version_added: '2.10' branch_name: description: - Name of the branch to build. Exactly one a of branch name, tag, or commit @@ -178,7 +174,6 @@ - The location of the source files to build. required: false type: dict - version_added: '2.10' suboptions: storage_source: description: @@ -286,7 +281,6 @@ - Substitutions data for Build resource. required: false type: dict - version_added: '2.10' queue_ttl: description: - TTL in queue for this build. If provided and the build is enqueued longer @@ -296,14 +290,12 @@ ''s''. Example: "3.5s".' required: false type: str - version_added: '2.10' logs_bucket: description: - Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build_id}.txt. required: false type: str - version_added: '2.10' timeout: description: - Amount of time that this build should be allowed to run, to second granularity. @@ -316,14 +308,12 @@ required: false default: 600s type: str - version_added: '2.10' secrets: description: - Secrets to decrypt using Cloud Key Management Service. elements: dict required: false type: list - version_added: '2.10' suboptions: kms_key_name: description: @@ -495,6 +485,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_cloudbuild_trigger_info.py b/plugins/modules/gcp_cloudbuild_trigger_info.py index f2c727077..81d784a1b 100644 --- a/plugins/modules/gcp_cloudbuild_trigger_info.py +++ b/plugins/modules/gcp_cloudbuild_trigger_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Trigger short_description: Gather info for GCP Trigger -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -511,7 +511,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_cloudfunctions_cloud_function.py b/plugins/modules/gcp_cloudfunctions_cloud_function.py index cf58cb6ce..00174c425 100644 --- a/plugins/modules/gcp_cloudfunctions_cloud_function.py +++ b/plugins/modules/gcp_cloudfunctions_cloud_function.py @@ -33,7 +33,6 @@ description: - A Cloud Function that contains user computation executed in response to an event. short_description: Creates a GCP CloudFunction -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -189,6 +188,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_cloudfunctions_cloud_function_info.py b/plugins/modules/gcp_cloudfunctions_cloud_function_info.py index e9d2839aa..c33cbc86a 100644 --- a/plugins/modules/gcp_cloudfunctions_cloud_function_info.py +++ b/plugins/modules/gcp_cloudfunctions_cloud_function_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP CloudFunction short_description: Gather info for GCP CloudFunction -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -257,7 +257,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_cloudscheduler_job.py b/plugins/modules/gcp_cloudscheduler_job.py index efb2652d3..7cff6d4dc 100644 --- a/plugins/modules/gcp_cloudscheduler_job.py +++ b/plugins/modules/gcp_cloudscheduler_job.py @@ -37,7 +37,6 @@ in one of the supported regions. If your project does not have an App Engine app, you must create one. short_description: Creates a GCP Job -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -324,6 +323,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_cloudscheduler_job_info.py b/plugins/modules/gcp_cloudscheduler_job_info.py index a372899a2..72c1da73d 100644 --- a/plugins/modules/gcp_cloudscheduler_job_info.py +++ b/plugins/modules/gcp_cloudscheduler_job_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Job short_description: Gather info for GCP Job -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -358,7 +358,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_cloudtasks_queue.py b/plugins/modules/gcp_cloudtasks_queue.py index 1fdd0b474..4e525b4ee 100644 --- a/plugins/modules/gcp_cloudtasks_queue.py +++ b/plugins/modules/gcp_cloudtasks_queue.py @@ -33,7 +33,6 @@ description: - A named resource to which messages are sent by publishers. short_description: Creates a GCP Queue -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -194,6 +193,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_cloudtasks_queue_info.py b/plugins/modules/gcp_cloudtasks_queue_info.py index f177c89a8..19664a42c 100644 --- a/plugins/modules/gcp_cloudtasks_queue_info.py +++ b/plugins/modules/gcp_cloudtasks_queue_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Queue short_description: Gather info for GCP Queue -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -250,7 +250,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_address.py b/plugins/modules/gcp_compute_address.py index ef2c5060e..c9ba654e0 100644 --- a/plugins/modules/gcp_compute_address.py +++ b/plugins/modules/gcp_compute_address.py @@ -42,7 +42,6 @@ a new internal IP address, either by Compute Engine or by you. External IP addresses can be either ephemeral or static. short_description: Creates a GCP Address -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,7 +70,6 @@ required: false default: EXTERNAL type: str - version_added: '2.7' description: description: - An optional description of this resource. @@ -95,7 +93,6 @@ - 'Some valid choices include: "GCE_ENDPOINT"' required: false type: str - version_added: '2.10' network_tier: description: - The networking tier used for configuring this address. If this field is not @@ -103,7 +100,6 @@ - 'Some valid choices include: "PREMIUM", "STANDARD"' required: false type: str - version_added: '2.8' subnetwork: description: - The URL of the subnetwork in which to reserve the address. If an IP address @@ -117,7 +113,6 @@ }}"' required: false type: dict - version_added: '2.7' region: description: - URL of the region where the regional address resides. @@ -155,6 +150,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_address_info.py b/plugins/modules/gcp_compute_address_info.py index 17919ffe2..4b6306060 100644 --- a/plugins/modules/gcp_compute_address_info.py +++ b/plugins/modules/gcp_compute_address_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Address short_description: Gather info for GCP Address -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - URL of the region where the regional address resides. @@ -83,6 +83,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -201,7 +202,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_autoscaler.py b/plugins/modules/gcp_compute_autoscaler.py index 6b770f135..d3c70a19d 100644 --- a/plugins/modules/gcp_compute_autoscaler.py +++ b/plugins/modules/gcp_compute_autoscaler.py @@ -35,7 +35,6 @@ - Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. short_description: Creates a GCP Autoscaler -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -112,7 +111,6 @@ required: false default: 'ON' type: str - version_added: '2.10' cpu_utilization: description: - Defines the CPU utilization policy that allows the autoscaler to scale based @@ -237,6 +235,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_autoscaler_info.py b/plugins/modules/gcp_compute_autoscaler_info.py index 8d18e90ee..46e2497c8 100644 --- a/plugins/modules/gcp_compute_autoscaler_info.py +++ b/plugins/modules/gcp_compute_autoscaler_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Autoscaler short_description: Gather info for GCP Autoscaler -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - URL of the zone where the instance group resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -261,7 +262,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_backend_bucket.py b/plugins/modules/gcp_compute_backend_bucket.py index fa774770f..5799facb2 100644 --- a/plugins/modules/gcp_compute_backend_bucket.py +++ b/plugins/modules/gcp_compute_backend_bucket.py @@ -37,7 +37,6 @@ rather than a backend service. It can send requests for static content to a Cloud Storage bucket and requests for dynamic content to a virtual machine instance. short_description: Creates a GCP BackendBucket -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -62,7 +61,6 @@ - Cloud CDN configuration for this Backend Bucket. required: false type: dict - version_added: '2.8' suboptions: signed_url_cache_max_age_sec: description: @@ -127,6 +125,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_backend_bucket_info.py b/plugins/modules/gcp_compute_backend_bucket_info.py index 1e6bc9614..6517059fe 100644 --- a/plugins/modules/gcp_compute_backend_bucket_info.py +++ b/plugins/modules/gcp_compute_backend_bucket_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP BackendBucket short_description: Gather info for GCP BackendBucket -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -170,7 +171,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_backend_service.py b/plugins/modules/gcp_compute_backend_service.py index bf09bc696..4d3094802 100644 --- a/plugins/modules/gcp_compute_backend_service.py +++ b/plugins/modules/gcp_compute_backend_service.py @@ -37,7 +37,6 @@ - For managed internal load balancing, use a regional backend service instead. - Currently self-managed internal load balancing is only available in beta. short_description: Creates a GCP BackendService -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -134,7 +133,6 @@ must be set. required: false type: int - version_added: '2.9' max_rate: description: - The max requests per second (RPS) of the group. @@ -159,7 +157,6 @@ must be set. required: false type: str - version_added: '2.9' max_utilization: description: - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization @@ -173,7 +170,6 @@ is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. required: false type: dict - version_added: '2.10' suboptions: max_requests_per_connection: description: @@ -221,7 +217,6 @@ This field is only applicable when locality_lb_policy is set to MAGLEV or RING_HASH. required: false type: dict - version_added: '2.10' suboptions: http_cookie: description: @@ -338,7 +333,6 @@ required: false default: '3600' type: int - version_added: '2.8' connection_draining: description: - Settings for connection draining . @@ -358,7 +352,6 @@ elements: str required: false type: list - version_added: '2.10' description: description: - An optional description of this resource. @@ -385,7 +378,6 @@ - Settings for enabling Cloud Identity Aware Proxy. required: false type: dict - version_added: '2.7' suboptions: enabled: description: @@ -411,7 +403,6 @@ required: false default: EXTERNAL type: str - version_added: '2.7' locality_lb_policy: description: - The load balancing algorithm used within the scope of the locality. @@ -435,7 +426,6 @@ "ORIGINAL_DESTINATION", "MAGLEV"' required: false type: str - version_added: '2.10' name: description: - Name of the resource. Provided by the client when the resource is created. The @@ -452,7 +442,6 @@ - This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. required: false type: dict - version_added: '2.10' suboptions: base_ejection_time: description: @@ -591,7 +580,6 @@ - The security policy associated with this backend service. required: false type: str - version_added: '2.8' session_affinity: description: - Type of session affinity to use. The default is NONE. Session affinity is not @@ -615,7 +603,6 @@ - If logging is enabled, logs will be exported to Stackdriver. required: false type: dict - version_added: '2.10' suboptions: enable: description: @@ -663,6 +650,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_backend_service_info.py b/plugins/modules/gcp_compute_backend_service_info.py index 3d60d0b3d..79e78600b 100644 --- a/plugins/modules/gcp_compute_backend_service_info.py +++ b/plugins/modules/gcp_compute_backend_service_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP BackendService short_description: Gather info for GCP BackendService -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -680,7 +681,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_disk.py b/plugins/modules/gcp_compute_disk.py index 165bc6449..292a84ffc 100644 --- a/plugins/modules/gcp_compute_disk.py +++ b/plugins/modules/gcp_compute_disk.py @@ -43,7 +43,6 @@ - Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics. short_description: Creates a GCP Disk -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -69,7 +68,6 @@ - Labels to apply to this disk. A list of key->value pairs. required: false type: dict - version_added: '2.7' licenses: description: - Any applicable publicly visible licenses. @@ -105,14 +103,12 @@ values for the caller's project. required: false type: int - version_added: '2.8' type: description: - URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. required: false type: str - version_added: '2.7' source_image: description: - The source image used to create this disk. If the source image is deleted, this @@ -237,6 +233,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_disk_info.py b/plugins/modules/gcp_compute_disk_info.py index 07add3b2c..3d0ba9678 100644 --- a/plugins/modules/gcp_compute_disk_info.py +++ b/plugins/modules/gcp_compute_disk_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Disk short_description: Gather info for GCP Disk -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - A reference to the zone where the disk resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -332,7 +333,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_external_vpn_gateway.py b/plugins/modules/gcp_compute_external_vpn_gateway.py index 27a1d3569..db3e2998e 100644 --- a/plugins/modules/gcp_compute_external_vpn_gateway.py +++ b/plugins/modules/gcp_compute_external_vpn_gateway.py @@ -33,7 +33,6 @@ description: - Represents a VPN gateway managed outside of GCP. short_description: Creates a GCP ExternalVpnGateway -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -88,7 +87,7 @@ description: - IP address of the interface in the external VPN gateway. - Only IPv4 is supported. This IP address can be either from your on-premise - gateway or another Cloud provider’s VPN gateway, it cannot be an IP address + gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine. required: false type: str @@ -123,6 +122,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -196,7 +196,7 @@ description: - IP address of the interface in the external VPN gateway. - Only IPv4 is supported. This IP address can be either from your on-premise - gateway or another Cloud provider’s VPN gateway, it cannot be an IP address + gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine. returned: success type: str diff --git a/plugins/modules/gcp_compute_external_vpn_gateway_info.py b/plugins/modules/gcp_compute_external_vpn_gateway_info.py index 0efe9e790..390733f78 100644 --- a/plugins/modules/gcp_compute_external_vpn_gateway_info.py +++ b/plugins/modules/gcp_compute_external_vpn_gateway_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP ExternalVpnGateway short_description: Gather info for GCP ExternalVpnGateway -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -149,7 +150,7 @@ description: - IP address of the interface in the external VPN gateway. - Only IPv4 is supported. This IP address can be either from your on-premise - gateway or another Cloud provider’s VPN gateway, it cannot be an IP address + gateway or another Cloud provider's VPN gateway, it cannot be an IP address from Google Compute Engine. returned: success type: str @@ -158,7 +159,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_firewall.py b/plugins/modules/gcp_compute_firewall.py index d3ef3b6b2..37d5b38b2 100644 --- a/plugins/modules/gcp_compute_firewall.py +++ b/plugins/modules/gcp_compute_firewall.py @@ -40,7 +40,6 @@ incoming traffic. For all networks except the default network, you must create any firewall rules you need. short_description: Creates a GCP Firewall -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -88,7 +87,6 @@ elements: dict required: false type: list - version_added: '2.8' suboptions: ip_protocol: description: @@ -122,7 +120,6 @@ elements: str required: false type: list - version_added: '2.8' direction: description: - 'Direction of traffic to which this firewall applies; default is INGRESS. Note: @@ -131,7 +128,6 @@ - 'Some valid choices include: "INGRESS", "EGRESS"' required: false type: str - version_added: '2.8' disabled: description: - Denotes whether the firewall rule is disabled, i.e not applied to the network @@ -140,14 +136,12 @@ rule will be enabled. required: false type: bool - version_added: '2.8' log_config: description: - This field denotes the logging options for a particular firewall rule. - If logging is enabled, logs will be exported to Cloud Logging. required: false type: dict - version_added: '2.10' suboptions: enable: description: @@ -198,7 +192,6 @@ required: false default: '1000' type: int - version_added: '2.8' source_ranges: description: - If source ranges are specified, the firewall will apply only to traffic that @@ -225,7 +218,6 @@ elements: str required: false type: list - version_added: '2.8' source_tags: description: - If source tags are specified, the firewall will apply only to traffic with source @@ -249,7 +241,6 @@ elements: str required: false type: list - version_added: '2.8' target_tags: description: - A list of instance tags indicating sets of instances located in the network @@ -290,6 +281,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_firewall_info.py b/plugins/modules/gcp_compute_firewall_info.py index 433573a5e..c16c63422 100644 --- a/plugins/modules/gcp_compute_firewall_info.py +++ b/plugins/modules/gcp_compute_firewall_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Firewall short_description: Gather info for GCP Firewall -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -305,7 +306,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_forwarding_rule.py b/plugins/modules/gcp_compute_forwarding_rule.py index 6ea99ba14..91d6bb7ee 100644 --- a/plugins/modules/gcp_compute_forwarding_rule.py +++ b/plugins/modules/gcp_compute_forwarding_rule.py @@ -35,7 +35,6 @@ virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple. short_description: Creates a GCP ForwardingRule -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -177,14 +176,12 @@ - The forwarded traffic must be of a type appropriate to the target object. required: false type: str - version_added: '2.7' allow_global_access: description: - If true, clients can access ILB from all regions. - Otherwise only allows from the local region the ILB is located at. required: false type: bool - version_added: '2.10' all_ports: description: - For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL @@ -193,7 +190,6 @@ Used with backend service. Cannot be set if port or portRange are set. required: false type: bool - version_added: '2.8' network_tier: description: - The networking tier used for configuring this address. If this field is not @@ -201,7 +197,6 @@ - 'Some valid choices include: "PREMIUM", "STANDARD"' required: false type: str - version_added: '2.8' service_label: description: - An optional prefix to the service name for this Forwarding Rule. @@ -214,7 +209,6 @@ - This field is only used for INTERNAL load balancing. required: false type: str - version_added: '2.8' region: description: - A reference to the region where the regional forwarding rule resides. @@ -252,6 +246,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_forwarding_rule_info.py b/plugins/modules/gcp_compute_forwarding_rule_info.py index 483ebfcd8..447d0769a 100644 --- a/plugins/modules/gcp_compute_forwarding_rule_info.py +++ b/plugins/modules/gcp_compute_forwarding_rule_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP ForwardingRule short_description: Gather info for GCP ForwardingRule -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - A reference to the region where the regional forwarding rule resides. @@ -83,6 +83,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -288,7 +289,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_global_address.py b/plugins/modules/gcp_compute_global_address.py index f308581d5..8e1c6449f 100644 --- a/plugins/modules/gcp_compute_global_address.py +++ b/plugins/modules/gcp_compute_global_address.py @@ -34,7 +34,6 @@ - Represents a Global Address resource. Global addresses are used for HTTP(S) load balancing. short_description: Creates a GCP GlobalAddress -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -54,7 +53,6 @@ - The static external IP address represented by this resource. required: false type: str - version_added: '2.8' description: description: - An optional description of this resource. @@ -83,7 +81,6 @@ - This field is not applicable to addresses with addressType=EXTERNAL. required: false type: int - version_added: '2.9' address_type: description: - The type of the address to reserve. @@ -93,7 +90,6 @@ required: false default: EXTERNAL type: str - version_added: '2.8' purpose: description: - The purpose of the resource. For global internal addresses it can be * VPC_PEERING @@ -101,7 +97,6 @@ - 'Some valid choices include: "VPC_PEERING"' required: false type: str - version_added: '2.9' network: description: - The URL of the network in which to reserve the IP range. The IP range must be @@ -115,7 +110,6 @@ }}"' required: false type: dict - version_added: '2.9' project: description: - The Google Cloud Platform project to use. @@ -147,6 +141,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_global_address_info.py b/plugins/modules/gcp_compute_global_address_info.py index 87f9a4eb1..bd6df653b 100644 --- a/plugins/modules/gcp_compute_global_address_info.py +++ b/plugins/modules/gcp_compute_global_address_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP GlobalAddress short_description: Gather info for GCP GlobalAddress -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -186,7 +187,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_global_forwarding_rule.py b/plugins/modules/gcp_compute_global_forwarding_rule.py index 5ac3eb1a0..4e3854064 100644 --- a/plugins/modules/gcp_compute_global_forwarding_rule.py +++ b/plugins/modules/gcp_compute_global_forwarding_rule.py @@ -37,7 +37,6 @@ - For more information, see U(https://cloud.google.com/compute/docs/load-balancing/http/) . short_description: Creates a GCP GlobalForwardingRule -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -122,7 +121,6 @@ elements: dict required: false type: list - version_added: '2.10' suboptions: filter_match_criteria: description: @@ -231,6 +229,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_global_forwarding_rule_info.py b/plugins/modules/gcp_compute_global_forwarding_rule_info.py index f936ed9c6..b16a6978a 100644 --- a/plugins/modules/gcp_compute_global_forwarding_rule_info.py +++ b/plugins/modules/gcp_compute_global_forwarding_rule_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP GlobalForwardingRule short_description: Gather info for GCP GlobalForwardingRule -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -265,7 +266,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_health_check.py b/plugins/modules/gcp_compute_health_check.py index 4bbada89e..81a8eb713 100644 --- a/plugins/modules/gcp_compute_health_check.py +++ b/plugins/modules/gcp_compute_health_check.py @@ -41,7 +41,6 @@ successfully to some number of consecutive probes, it is marked healthy again and can receive new connections. short_description: Creates a GCP HealthCheck -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -171,7 +170,6 @@ - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' required: false type: str - version_added: '2.9' https_health_check: description: - A nested object resource. @@ -233,7 +231,6 @@ - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' required: false type: str - version_added: '2.9' tcp_health_check: description: - A nested object resource. @@ -288,7 +285,6 @@ - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' required: false type: str - version_added: '2.9' ssl_health_check: description: - A nested object resource. @@ -343,13 +339,11 @@ - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' required: false type: str - version_added: '2.9' http2_health_check: description: - A nested object resource. required: false type: dict - version_added: '2.10' suboptions: host: description: @@ -437,6 +431,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_health_check_info.py b/plugins/modules/gcp_compute_health_check_info.py index 53298594a..3762b1c1b 100644 --- a/plugins/modules/gcp_compute_health_check_info.py +++ b/plugins/modules/gcp_compute_health_check_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP HealthCheck short_description: Gather info for GCP HealthCheck -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -455,7 +456,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_http_health_check.py b/plugins/modules/gcp_compute_http_health_check.py index 5969c783e..d4c67783a 100644 --- a/plugins/modules/gcp_compute_http_health_check.py +++ b/plugins/modules/gcp_compute_http_health_check.py @@ -34,7 +34,6 @@ - An HttpHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTP. short_description: Creates a GCP HttpHealthCheck -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -144,6 +143,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_http_health_check_info.py b/plugins/modules/gcp_compute_http_health_check_info.py index a1ec4c1df..f3721338f 100644 --- a/plugins/modules/gcp_compute_http_health_check_info.py +++ b/plugins/modules/gcp_compute_http_health_check_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP HttpHealthCheck short_description: Gather info for GCP HttpHealthCheck -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -187,7 +188,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_https_health_check.py b/plugins/modules/gcp_compute_https_health_check.py index 12dcd6e1c..417924285 100644 --- a/plugins/modules/gcp_compute_https_health_check.py +++ b/plugins/modules/gcp_compute_https_health_check.py @@ -34,7 +34,6 @@ - An HttpsHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTPS. short_description: Creates a GCP HttpsHealthCheck -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -141,6 +140,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_https_health_check_info.py b/plugins/modules/gcp_compute_https_health_check_info.py index 2628e3316..a076ec3d3 100644 --- a/plugins/modules/gcp_compute_https_health_check_info.py +++ b/plugins/modules/gcp_compute_https_health_check_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP HttpsHealthCheck short_description: Gather info for GCP HttpsHealthCheck -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -187,7 +188,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_image.py b/plugins/modules/gcp_compute_image.py index 1d8621113..b4f910151 100644 --- a/plugins/modules/gcp_compute_image.py +++ b/plugins/modules/gcp_compute_image.py @@ -43,7 +43,6 @@ You can create a custom image from root persistent disks and other images. Then, use the custom image to create an instance. short_description: Creates a GCP Image -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -111,7 +110,6 @@ - Labels to apply to this Image. required: false type: dict - version_added: '2.8' licenses: description: - Any applicable license URI. @@ -198,7 +196,6 @@ }}"' required: false type: dict - version_added: '2.10' source_snapshot: description: - URL of the source snapshot used to create this image. @@ -212,7 +209,6 @@ name-of-resource }}"' required: false type: dict - version_added: '2.10' source_type: description: - The type of the image used to create this disk. The default and only value is @@ -251,6 +247,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_image_info.py b/plugins/modules/gcp_compute_image_info.py index 66bbd7aed..264d2631a 100644 --- a/plugins/modules/gcp_compute_image_info.py +++ b/plugins/modules/gcp_compute_image_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Image short_description: Gather info for GCP Image -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -333,7 +334,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_instance.py b/plugins/modules/gcp_compute_instance.py index c153127e6..cb9b7f29d 100644 --- a/plugins/modules/gcp_compute_instance.py +++ b/plugins/modules/gcp_compute_instance.py @@ -33,7 +33,6 @@ description: - An instance is a virtual machine (VM) hosted on Google's infrastructure. short_description: Creates a GCP Instance -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -62,7 +61,6 @@ - Whether the resource should be protected against deletion. required: false type: bool - version_added: '2.9' disks: description: - An array of disks that are associated with the instances that are created from @@ -233,13 +231,11 @@ when using zonal DNS. required: false type: str - version_added: '2.9' labels: description: - Labels to apply to this instance. A list of key->value pairs. required: false type: dict - version_added: '2.9' metadata: description: - The metadata key/value pairs to assign to instances that are created from this @@ -319,14 +315,12 @@ external IP address of the instance to a DNS domain name. required: false type: bool - version_added: '2.10' public_ptr_domain_name: description: - The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. required: false type: str - version_added: '2.10' network_tier: description: - This signifies the networking tier used for configuring this access @@ -338,7 +332,6 @@ - 'Some valid choices include: "PREMIUM", "STANDARD"' required: false type: str - version_added: '2.10' alias_ip_ranges: description: - An array of alias IP ranges for this network interface. Can only be specified @@ -448,7 +441,6 @@ - Configuration for various parameters related to shielded instances. required: false type: dict - version_added: '2.9' suboptions: enable_secure_boot: description: @@ -475,7 +467,6 @@ "SUSPENDING", "SUSPENDED", "TERMINATED"' required: false type: str - version_added: '2.8' tags: description: - A list of tags to apply to this instance. Tags are used to identify valid sources @@ -537,6 +528,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_instance_group.py b/plugins/modules/gcp_compute_instance_group.py index c9cb29393..347c4d50c 100644 --- a/plugins/modules/gcp_compute_instance_group.py +++ b/plugins/modules/gcp_compute_instance_group.py @@ -36,7 +36,6 @@ template. Unlike managed instance groups, you must create and add instances to an instance group manually. short_description: Creates a GCP InstanceGroup -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -126,7 +125,6 @@ elements: dict required: false type: list - version_added: '2.8' project: description: - The Google Cloud Platform project to use. @@ -158,6 +156,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_instance_group_info.py b/plugins/modules/gcp_compute_instance_group_info.py index ee29929f3..9c78d1b9b 100644 --- a/plugins/modules/gcp_compute_instance_group_info.py +++ b/plugins/modules/gcp_compute_instance_group_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP InstanceGroup short_description: Gather info for GCP InstanceGroup -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - A reference to the zone where the instance group resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -196,7 +197,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_instance_group_manager.py b/plugins/modules/gcp_compute_instance_group_manager.py index dc3beb5dc..7c81c25f1 100644 --- a/plugins/modules/gcp_compute_instance_group_manager.py +++ b/plugins/modules/gcp_compute_instance_group_manager.py @@ -38,7 +38,6 @@ must separately verify the status of the individual instances. - A managed instance group can have up to 1000 VM instances per group. short_description: Creates a GCP InstanceGroupManager -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -155,6 +154,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_instance_group_manager_info.py b/plugins/modules/gcp_compute_instance_group_manager_info.py index beca92bad..000077265 100644 --- a/plugins/modules/gcp_compute_instance_group_manager_info.py +++ b/plugins/modules/gcp_compute_instance_group_manager_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP InstanceGroupManager short_description: Gather info for GCP InstanceGroupManager -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - The zone the managed instance group resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -271,7 +272,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_instance_info.py b/plugins/modules/gcp_compute_instance_info.py index 9d91b1957..e688680ac 100644 --- a/plugins/modules/gcp_compute_instance_info.py +++ b/plugins/modules/gcp_compute_instance_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Instance short_description: Gather info for GCP Instance -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - A reference to the zone where the machine resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -580,7 +581,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_instance_template.py b/plugins/modules/gcp_compute_instance_template.py index d75d81563..f78d402fc 100644 --- a/plugins/modules/gcp_compute_instance_template.py +++ b/plugins/modules/gcp_compute_instance_template.py @@ -39,7 +39,6 @@ - 'Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion.' short_description: Creates a GCP InstanceTemplate -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -236,7 +235,6 @@ - Labels to apply to this address. A list of key->value pairs. required: false type: dict - version_added: '2.9' machine_type: description: - The machine type to use in the VM instance template. @@ -326,14 +324,12 @@ the external IP address of the instance to a DNS domain name. required: false type: bool - version_added: '2.10' public_ptr_domain_name: description: - The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. required: false type: str - version_added: '2.10' network_tier: description: - This signifies the networking tier used for configuring this access @@ -345,7 +341,6 @@ - 'Some valid choices include: "PREMIUM", "STANDARD"' required: false type: str - version_added: '2.10' alias_ip_ranges: description: - An array of alias IP ranges for this network interface. Can only be @@ -508,6 +503,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_instance_template_info.py b/plugins/modules/gcp_compute_instance_template_info.py index 8f3de7197..093e75aeb 100644 --- a/plugins/modules/gcp_compute_instance_template_info.py +++ b/plugins/modules/gcp_compute_instance_template_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP InstanceTemplate short_description: Gather info for GCP InstanceTemplate -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -543,7 +544,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_interconnect_attachment.py b/plugins/modules/gcp_compute_interconnect_attachment.py index 2cec2a27f..8635fc17d 100644 --- a/plugins/modules/gcp_compute_interconnect_attachment.py +++ b/plugins/modules/gcp_compute_interconnect_attachment.py @@ -34,7 +34,6 @@ - Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments. short_description: Creates a GCP InterconnectAttachment -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -56,7 +55,6 @@ required: false default: 'true' type: bool - version_added: '2.9' interconnect: description: - URL of the underlying Interconnect object that this attachment's traffic will @@ -82,7 +80,6 @@ "BPS_50G"' required: false type: str - version_added: '2.9' edge_availability_domain: description: - Desired availability domain for the attachment. Only available for type PARTNER, @@ -176,6 +173,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_interconnect_attachment_info.py b/plugins/modules/gcp_compute_interconnect_attachment_info.py index 819d95238..db69f62d4 100644 --- a/plugins/modules/gcp_compute_interconnect_attachment_info.py +++ b/plugins/modules/gcp_compute_interconnect_attachment_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP InterconnectAttachment short_description: Gather info for GCP InterconnectAttachment -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - Region where the regional interconnect attachment resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -267,7 +268,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_network.py b/plugins/modules/gcp_compute_network.py index 7a3f03068..707890f10 100644 --- a/plugins/modules/gcp_compute_network.py +++ b/plugins/modules/gcp_compute_network.py @@ -33,7 +33,6 @@ description: - Manages a VPC network or legacy network resource on GCP. short_description: Creates a GCP Network -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -79,7 +78,6 @@ to determine what type of network-wide routing behavior to enforce. required: false type: dict - version_added: '2.8' suboptions: routing_mode: description: @@ -122,6 +120,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_network_endpoint_group.py b/plugins/modules/gcp_compute_network_endpoint_group.py index 977100024..14a7a4831 100644 --- a/plugins/modules/gcp_compute_network_endpoint_group.py +++ b/plugins/modules/gcp_compute_network_endpoint_group.py @@ -40,7 +40,6 @@ you can distribute traffic in a granular fashion among applications or containers running within VM instances. short_description: Creates a GCP NetworkEndpointGroup -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -140,6 +139,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_network_endpoint_group_info.py b/plugins/modules/gcp_compute_network_endpoint_group_info.py index 53d658766..9f2bede12 100644 --- a/plugins/modules/gcp_compute_network_endpoint_group_info.py +++ b/plugins/modules/gcp_compute_network_endpoint_group_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP NetworkEndpointGroup short_description: Gather info for GCP NetworkEndpointGroup -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - Zone where the network endpoint group is located. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -175,7 +176,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_network_info.py b/plugins/modules/gcp_compute_network_info.py index 5de688474..1957072bf 100644 --- a/plugins/modules/gcp_compute_network_info.py +++ b/plugins/modules/gcp_compute_network_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Network short_description: Gather info for GCP Network -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -179,7 +180,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_node_group.py b/plugins/modules/gcp_compute_node_group.py index adc465f95..aba41959e 100644 --- a/plugins/modules/gcp_compute_node_group.py +++ b/plugins/modules/gcp_compute_node_group.py @@ -33,7 +33,6 @@ description: - Represents a NodeGroup resource to manage a group of sole-tenant nodes. short_description: Creates a GCP NodeGroup -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -109,6 +108,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_node_group_info.py b/plugins/modules/gcp_compute_node_group_info.py index f85939d25..3fae1da2e 100644 --- a/plugins/modules/gcp_compute_node_group_info.py +++ b/plugins/modules/gcp_compute_node_group_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP NodeGroup short_description: Gather info for GCP NodeGroup -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - Zone where this node group is located . @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -153,7 +154,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_node_template.py b/plugins/modules/gcp_compute_node_template.py index 4a9aaa9c6..755939498 100644 --- a/plugins/modules/gcp_compute_node_template.py +++ b/plugins/modules/gcp_compute_node_template.py @@ -35,7 +35,6 @@ sole-tenant nodes, such as node type, vCPU and memory requirements, node affinity labels, and region. short_description: Creates a GCP NodeTemplate -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -125,6 +124,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_node_template_info.py b/plugins/modules/gcp_compute_node_template_info.py index c4ad2daef..b79a00339 100644 --- a/plugins/modules/gcp_compute_node_template_info.py +++ b/plugins/modules/gcp_compute_node_template_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP NodeTemplate short_description: Gather info for GCP NodeTemplate -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - Region where nodes using the node template will be created . @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -177,7 +178,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_autoscaler.py b/plugins/modules/gcp_compute_region_autoscaler.py index c36a25566..7a4090201 100644 --- a/plugins/modules/gcp_compute_region_autoscaler.py +++ b/plugins/modules/gcp_compute_region_autoscaler.py @@ -35,7 +35,6 @@ - Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. short_description: Creates a GCP RegionAutoscaler -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -213,6 +212,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_autoscaler_info.py b/plugins/modules/gcp_compute_region_autoscaler_info.py index b5a037a84..46a76613e 100644 --- a/plugins/modules/gcp_compute_region_autoscaler_info.py +++ b/plugins/modules/gcp_compute_region_autoscaler_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionAutoscaler short_description: Gather info for GCP RegionAutoscaler -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - URL of the region where the instance group resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -261,7 +262,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_backend_service.py b/plugins/modules/gcp_compute_region_backend_service.py index e34115183..b8570b4ae 100644 --- a/plugins/modules/gcp_compute_region_backend_service.py +++ b/plugins/modules/gcp_compute_region_backend_service.py @@ -34,7 +34,6 @@ - A Region Backend Service defines a regionally-scoped group of virtual machines that will serve traffic for load balancing. short_description: Creates a GCP RegionBackendService -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -616,6 +615,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_backend_service_info.py b/plugins/modules/gcp_compute_region_backend_service_info.py index 1b40a899b..d707f522b 100644 --- a/plugins/modules/gcp_compute_region_backend_service_info.py +++ b/plugins/modules/gcp_compute_region_backend_service_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionBackendService short_description: Gather info for GCP RegionBackendService -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - A reference to the region where the regional backend service resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -655,7 +656,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_disk.py b/plugins/modules/gcp_compute_region_disk.py index 459929af5..d3db5681e 100644 --- a/plugins/modules/gcp_compute_region_disk.py +++ b/plugins/modules/gcp_compute_region_disk.py @@ -43,7 +43,6 @@ - Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics. short_description: Creates a GCP RegionDisk -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -195,6 +194,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_disk_info.py b/plugins/modules/gcp_compute_region_disk_info.py index e3112e274..b789d541c 100644 --- a/plugins/modules/gcp_compute_region_disk_info.py +++ b/plugins/modules/gcp_compute_region_disk_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionDisk short_description: Gather info for GCP RegionDisk -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - A reference to the region where the disk resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -276,7 +277,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_health_check.py b/plugins/modules/gcp_compute_region_health_check.py index 0a4832cac..8f8c544e8 100644 --- a/plugins/modules/gcp_compute_region_health_check.py +++ b/plugins/modules/gcp_compute_region_health_check.py @@ -41,7 +41,6 @@ successfully to some number of consecutive probes, it is marked healthy again and can receive new connections. short_description: Creates a GCP RegionHealthCheck -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -435,6 +434,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_health_check_info.py b/plugins/modules/gcp_compute_region_health_check_info.py index dd6c982dc..3f28a668d 100644 --- a/plugins/modules/gcp_compute_region_health_check_info.py +++ b/plugins/modules/gcp_compute_region_health_check_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionHealthCheck short_description: Gather info for GCP RegionHealthCheck -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The region where the regional health check resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -466,7 +467,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_instance_group_manager.py b/plugins/modules/gcp_compute_region_instance_group_manager.py index 5a091736f..2afca8af4 100644 --- a/plugins/modules/gcp_compute_region_instance_group_manager.py +++ b/plugins/modules/gcp_compute_region_instance_group_manager.py @@ -38,7 +38,6 @@ must separately verify the status of the individual instances. - A managed instance group can have up to 1000 VM instances per group. short_description: Creates a GCP RegionInstanceGroupManager -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -173,6 +172,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_instance_group_manager_info.py b/plugins/modules/gcp_compute_region_instance_group_manager_info.py index f1818357f..d7380116a 100644 --- a/plugins/modules/gcp_compute_region_instance_group_manager_info.py +++ b/plugins/modules/gcp_compute_region_instance_group_manager_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionInstanceGroupManager short_description: Gather info for GCP RegionInstanceGroupManager -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The region the managed instance group resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -284,7 +285,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_target_http_proxy.py b/plugins/modules/gcp_compute_region_target_http_proxy.py index 26a2d66d0..bd155d401 100644 --- a/plugins/modules/gcp_compute_region_target_http_proxy.py +++ b/plugins/modules/gcp_compute_region_target_http_proxy.py @@ -34,7 +34,6 @@ - Represents a RegionTargetHttpProxy resource, which is used by one or more forwarding rules to route incoming HTTP requests to a URL map. short_description: Creates a GCP RegionTargetHttpProxy -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -111,6 +110,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_target_http_proxy_info.py b/plugins/modules/gcp_compute_region_target_http_proxy_info.py index c25edd6d8..6284c631a 100644 --- a/plugins/modules/gcp_compute_region_target_http_proxy_info.py +++ b/plugins/modules/gcp_compute_region_target_http_proxy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionTargetHttpProxy short_description: Gather info for GCP RegionTargetHttpProxy -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The region where the regional proxy resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -159,7 +160,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_target_https_proxy.py b/plugins/modules/gcp_compute_region_target_https_proxy.py index 13fe8468e..837c8d68c 100644 --- a/plugins/modules/gcp_compute_region_target_https_proxy.py +++ b/plugins/modules/gcp_compute_region_target_https_proxy.py @@ -34,7 +34,6 @@ - Represents a RegionTargetHttpsProxy resource, which is used by one or more forwarding rules to route incoming HTTPS requests to a URL map. short_description: Creates a GCP RegionTargetHttpsProxy -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -119,6 +118,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_target_https_proxy_info.py b/plugins/modules/gcp_compute_region_target_https_proxy_info.py index 31068a555..7f6cbb890 100644 --- a/plugins/modules/gcp_compute_region_target_https_proxy_info.py +++ b/plugins/modules/gcp_compute_region_target_https_proxy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionTargetHttpsProxy short_description: Gather info for GCP RegionTargetHttpsProxy -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The region where the regional proxy resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -166,7 +167,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_region_url_map.py b/plugins/modules/gcp_compute_region_url_map.py index 7dfc08115..0172eec5d 100644 --- a/plugins/modules/gcp_compute_region_url_map.py +++ b/plugins/modules/gcp_compute_region_url_map.py @@ -34,7 +34,6 @@ - UrlMaps are used to route requests to a backend service based on rules that you define for the host and path of an incoming URL. short_description: Creates a GCP RegionUrlMap -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -1622,6 +1621,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_region_url_map_info.py b/plugins/modules/gcp_compute_region_url_map_info.py index 82c232931..6eb3a6b5a 100644 --- a/plugins/modules/gcp_compute_region_url_map_info.py +++ b/plugins/modules/gcp_compute_region_url_map_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP RegionUrlMap short_description: Gather info for GCP RegionUrlMap -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - A reference to the region where the url map resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -1587,7 +1588,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_reservation.py b/plugins/modules/gcp_compute_reservation.py index 101539f3c..4f95e2815 100644 --- a/plugins/modules/gcp_compute_reservation.py +++ b/plugins/modules/gcp_compute_reservation.py @@ -38,7 +38,6 @@ preemptible VMs, sole tenant nodes, or other services not listed above like Cloud SQL and Dataflow. short_description: Creates a GCP Reservation -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -181,6 +180,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_reservation_info.py b/plugins/modules/gcp_compute_reservation_info.py index 23267d2bf..33605b322 100644 --- a/plugins/modules/gcp_compute_reservation_info.py +++ b/plugins/modules/gcp_compute_reservation_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Reservation short_description: Gather info for GCP Reservation -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - The zone where the reservation is made. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -241,7 +242,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_resource_policy.py b/plugins/modules/gcp_compute_resource_policy.py index f90f3d8c0..b42ef2133 100644 --- a/plugins/modules/gcp_compute_resource_policy.py +++ b/plugins/modules/gcp_compute_resource_policy.py @@ -34,7 +34,6 @@ - A policy that can be attached to a resource to specify or schedule actions on that resource. short_description: Creates a GCP ResourcePolicy -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -243,6 +242,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_resource_policy_info.py b/plugins/modules/gcp_compute_resource_policy_info.py index bb2e30e21..1f8aae69b 100644 --- a/plugins/modules/gcp_compute_resource_policy_info.py +++ b/plugins/modules/gcp_compute_resource_policy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP ResourcePolicy short_description: Gather info for GCP ResourcePolicy -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - Region where resource policy resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -279,7 +280,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_route.py b/plugins/modules/gcp_compute_route.py index 56c957180..645f5b12f 100644 --- a/plugins/modules/gcp_compute_route.py +++ b/plugins/modules/gcp_compute_route.py @@ -48,7 +48,6 @@ - A Route resource must have exactly one specification of either nextHopGateway, nextHopInstance, nextHopIp, nextHopVpnTunnel, or nextHopIlb. short_description: Creates a GCP Route -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -75,7 +74,6 @@ the resource. required: false type: str - version_added: '2.7' name: description: - Name of the resource. Provided by the client when the resource is created. The @@ -163,7 +161,6 @@ field to "{{ name-of-resource }}"' required: false type: dict - version_added: '2.10' project: description: - The Google Cloud Platform project to use. @@ -195,6 +192,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_route_info.py b/plugins/modules/gcp_compute_route_info.py index e46fd875e..d50340012 100644 --- a/plugins/modules/gcp_compute_route_info.py +++ b/plugins/modules/gcp_compute_route_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Route short_description: Gather info for GCP Route -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -200,7 +201,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_router.py b/plugins/modules/gcp_compute_router.py index cf876d945..ddc32c9cb 100644 --- a/plugins/modules/gcp_compute_router.py +++ b/plugins/modules/gcp_compute_router.py @@ -33,7 +33,6 @@ description: - Represents a Router resource. short_description: Creates a GCP Router -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -160,6 +159,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_router_info.py b/plugins/modules/gcp_compute_router_info.py index f08d857ad..a5bd66bd0 100644 --- a/plugins/modules/gcp_compute_router_info.py +++ b/plugins/modules/gcp_compute_router_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Router short_description: Gather info for GCP Router -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - Region where the router resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -205,7 +206,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_snapshot.py b/plugins/modules/gcp_compute_snapshot.py index e33d43691..ba32d735d 100644 --- a/plugins/modules/gcp_compute_snapshot.py +++ b/plugins/modules/gcp_compute_snapshot.py @@ -41,7 +41,6 @@ faster and at a much lower cost than if you regularly created a full image of the disk. short_description: Creates a GCP Snapshot -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -158,6 +157,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_snapshot_info.py b/plugins/modules/gcp_compute_snapshot_info.py index cb75b484f..2132ca291 100644 --- a/plugins/modules/gcp_compute_snapshot_info.py +++ b/plugins/modules/gcp_compute_snapshot_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Snapshot short_description: Gather info for GCP Snapshot -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -224,7 +225,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_ssl_certificate.py b/plugins/modules/gcp_compute_ssl_certificate.py index b3fe270c7..376b369de 100644 --- a/plugins/modules/gcp_compute_ssl_certificate.py +++ b/plugins/modules/gcp_compute_ssl_certificate.py @@ -35,7 +35,6 @@ a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user. short_description: Creates a GCP SslCertificate -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -108,6 +107,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_ssl_certificate_info.py b/plugins/modules/gcp_compute_ssl_certificate_info.py index 59efe3c34..4b4894711 100644 --- a/plugins/modules/gcp_compute_ssl_certificate_info.py +++ b/plugins/modules/gcp_compute_ssl_certificate_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP SslCertificate short_description: Gather info for GCP SslCertificate -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -154,7 +155,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_ssl_policy.py b/plugins/modules/gcp_compute_ssl_policy.py index d24ad212d..3d1ac559c 100644 --- a/plugins/modules/gcp_compute_ssl_policy.py +++ b/plugins/modules/gcp_compute_ssl_policy.py @@ -34,7 +34,6 @@ - Represents a SSL policy. SSL policies give you the ability to control the features of SSL that your SSL proxy or HTTPS load balancer negotiates. short_description: Creates a GCP SslPolicy -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -118,6 +117,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_ssl_policy_info.py b/plugins/modules/gcp_compute_ssl_policy_info.py index 8bdbbe645..67902ab9a 100644 --- a/plugins/modules/gcp_compute_ssl_policy_info.py +++ b/plugins/modules/gcp_compute_ssl_policy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP SslPolicy short_description: Gather info for GCP SslPolicy -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -190,7 +191,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_subnetwork.py b/plugins/modules/gcp_compute_subnetwork.py index 302fb94d2..b1c4d9c29 100644 --- a/plugins/modules/gcp_compute_subnetwork.py +++ b/plugins/modules/gcp_compute_subnetwork.py @@ -49,7 +49,6 @@ private IP addresses. You can isolate portions of the network, even entire subnets, using firewall rules. short_description: Creates a GCP Subnetwork -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -107,7 +106,6 @@ elements: dict required: false type: list - version_added: '2.8' suboptions: range_name: description: @@ -166,6 +164,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_subnetwork_info.py b/plugins/modules/gcp_compute_subnetwork_info.py index 4f34e33e0..44f7ae2b3 100644 --- a/plugins/modules/gcp_compute_subnetwork_info.py +++ b/plugins/modules/gcp_compute_subnetwork_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Subnetwork short_description: Gather info for GCP Subnetwork -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The GCP region for this subnetwork. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -204,7 +205,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_target_http_proxy.py b/plugins/modules/gcp_compute_target_http_proxy.py index 6b784b409..c05d8d97d 100644 --- a/plugins/modules/gcp_compute_target_http_proxy.py +++ b/plugins/modules/gcp_compute_target_http_proxy.py @@ -34,7 +34,6 @@ - Represents a TargetHttpProxy resource, which is used by one or more global forwarding rule to route incoming HTTP requests to a URL map. short_description: Creates a GCP TargetHttpProxy -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -106,6 +105,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_target_http_proxy_info.py b/plugins/modules/gcp_compute_target_http_proxy_info.py index 6d66927ea..eba12eab9 100644 --- a/plugins/modules/gcp_compute_target_http_proxy_info.py +++ b/plugins/modules/gcp_compute_target_http_proxy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP TargetHttpProxy short_description: Gather info for GCP TargetHttpProxy -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -148,7 +149,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_target_https_proxy.py b/plugins/modules/gcp_compute_target_https_proxy.py index f7c28438a..2bca830d2 100644 --- a/plugins/modules/gcp_compute_target_https_proxy.py +++ b/plugins/modules/gcp_compute_target_https_proxy.py @@ -34,7 +34,6 @@ - Represents a TargetHttpsProxy resource, which is used by one or more global forwarding rule to route incoming HTTPS requests to a URL map. short_description: Creates a GCP TargetHttpsProxy -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -73,7 +72,6 @@ - 'Some valid choices include: "NONE", "ENABLE", "DISABLE"' required: false type: str - version_added: '2.7' ssl_certificates: description: - A list of SslCertificate resources that are used to authenticate connections @@ -93,7 +91,6 @@ }}"' required: false type: dict - version_added: '2.8' url_map: description: - A reference to the UrlMap resource that defines the mapping from URL to the @@ -136,6 +133,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_target_https_proxy_info.py b/plugins/modules/gcp_compute_target_https_proxy_info.py index 62143ff06..696983d9f 100644 --- a/plugins/modules/gcp_compute_target_https_proxy_info.py +++ b/plugins/modules/gcp_compute_target_https_proxy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP TargetHttpsProxy short_description: Gather info for GCP TargetHttpsProxy -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -170,7 +171,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_target_instance.py b/plugins/modules/gcp_compute_target_instance.py index 9b843b77c..09b05316b 100644 --- a/plugins/modules/gcp_compute_target_instance.py +++ b/plugins/modules/gcp_compute_target_instance.py @@ -37,7 +37,6 @@ instance contains a single virtual machine instance that receives and handles traffic from the corresponding forwarding rules. short_description: Creates a GCP TargetInstance -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -123,6 +122,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_target_instance_info.py b/plugins/modules/gcp_compute_target_instance_info.py index 5ceb6d66e..2dae94e7c 100644 --- a/plugins/modules/gcp_compute_target_instance_info.py +++ b/plugins/modules/gcp_compute_target_instance_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP TargetInstance short_description: Gather info for GCP TargetInstance -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str zone: description: - URL of the zone where the target instance resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -161,7 +162,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_target_pool.py b/plugins/modules/gcp_compute_target_pool.py index c3c9ab88e..e3eb9aa5a 100644 --- a/plugins/modules/gcp_compute_target_pool.py +++ b/plugins/modules/gcp_compute_target_pool.py @@ -33,7 +33,6 @@ description: - Represents a TargetPool resource, used for Load Balancing. short_description: Creates a GCP TargetPool -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -165,6 +164,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_target_pool_info.py b/plugins/modules/gcp_compute_target_pool_info.py index a89ce1bfe..59848ff22 100644 --- a/plugins/modules/gcp_compute_target_pool_info.py +++ b/plugins/modules/gcp_compute_target_pool_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP TargetPool short_description: Gather info for GCP TargetPool -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The region where the target pool resides. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -207,7 +208,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_target_ssl_proxy.py b/plugins/modules/gcp_compute_target_ssl_proxy.py index 029742f12..75f67f273 100644 --- a/plugins/modules/gcp_compute_target_ssl_proxy.py +++ b/plugins/modules/gcp_compute_target_ssl_proxy.py @@ -34,7 +34,6 @@ - Represents a TargetSslProxy resource, which is used by one or more global forwarding rule to route incoming SSL requests to a backend service. short_description: Creates a GCP TargetSslProxy -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -100,7 +99,6 @@ }}"' required: false type: dict - version_added: '2.8' project: description: - The Google Cloud Platform project to use. @@ -132,6 +130,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_target_ssl_proxy_info.py b/plugins/modules/gcp_compute_target_ssl_proxy_info.py index a28496113..166b33389 100644 --- a/plugins/modules/gcp_compute_target_ssl_proxy_info.py +++ b/plugins/modules/gcp_compute_target_ssl_proxy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP TargetSslProxy short_description: Gather info for GCP TargetSslProxy -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -166,7 +167,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_target_tcp_proxy.py b/plugins/modules/gcp_compute_target_tcp_proxy.py index 52540e97b..61a9f1b43 100644 --- a/plugins/modules/gcp_compute_target_tcp_proxy.py +++ b/plugins/modules/gcp_compute_target_tcp_proxy.py @@ -34,7 +34,6 @@ - Represents a TargetTcpProxy resource, which is used by one or more global forwarding rule to route incoming TCP requests to a Backend service. short_description: Creates a GCP TargetTcpProxy -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -111,6 +110,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_target_tcp_proxy_info.py b/plugins/modules/gcp_compute_target_tcp_proxy_info.py index 40e2eceef..8ca22484a 100644 --- a/plugins/modules/gcp_compute_target_tcp_proxy_info.py +++ b/plugins/modules/gcp_compute_target_tcp_proxy_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP TargetTcpProxy short_description: Gather info for GCP TargetTcpProxy -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -152,7 +153,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_target_vpn_gateway.py b/plugins/modules/gcp_compute_target_vpn_gateway.py index 52454b62f..bfacdefac 100644 --- a/plugins/modules/gcp_compute_target_vpn_gateway.py +++ b/plugins/modules/gcp_compute_target_vpn_gateway.py @@ -34,7 +34,6 @@ - Represents a VPN gateway running in GCP. This virtual device is managed by Google, but used only by you. short_description: Creates a GCP TargetVpnGateway -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -110,6 +109,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_target_vpn_gateway_info.py b/plugins/modules/gcp_compute_target_vpn_gateway_info.py index 2de42dcf3..567bfddbc 100644 --- a/plugins/modules/gcp_compute_target_vpn_gateway_info.py +++ b/plugins/modules/gcp_compute_target_vpn_gateway_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP TargetVpnGateway short_description: Gather info for GCP TargetVpnGateway -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The region this gateway should sit in. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -169,7 +170,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_url_map.py b/plugins/modules/gcp_compute_url_map.py index 8f0bc7248..3f854c458 100644 --- a/plugins/modules/gcp_compute_url_map.py +++ b/plugins/modules/gcp_compute_url_map.py @@ -34,7 +34,6 @@ - UrlMaps are used to route requests to a backend service based on rules that you define for the host and path of an incoming URL. short_description: Creates a GCP UrlMap -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -78,7 +77,6 @@ headerAction specified under pathMatcher. required: false type: dict - version_added: '2.10' suboptions: request_headers_to_add: description: @@ -224,7 +222,6 @@ in the UrlMap . required: false type: dict - version_added: '2.10' suboptions: request_headers_to_add: description: @@ -344,7 +341,6 @@ Only one of routeAction or urlRedirect must be set. required: false type: dict - version_added: '2.10' suboptions: cors_policy: description: @@ -724,7 +720,6 @@ must not be set. required: false type: dict - version_added: '2.10' suboptions: host_redirect: description: @@ -798,7 +793,6 @@ elements: dict required: false type: list - version_added: '2.10' suboptions: priority: description: @@ -1585,7 +1579,6 @@ defaultService or defaultRouteAction must not be set. required: false type: dict - version_added: '2.10' suboptions: host_redirect: description: @@ -1658,7 +1651,6 @@ - Only one of defaultRouteAction or defaultUrlRedirect must be set. required: false type: dict - version_added: '2.10' suboptions: weighted_backend_services: description: @@ -2089,7 +2081,6 @@ or defaultRouteAction must not be set. required: false type: dict - version_added: '2.10' suboptions: host_redirect: description: @@ -2159,7 +2150,6 @@ - Only one of defaultRouteAction or defaultUrlRedirect must be set. required: false type: dict - version_added: '2.10' suboptions: weighted_backend_services: description: @@ -2575,6 +2565,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_url_map_info.py b/plugins/modules/gcp_compute_url_map_info.py index 06e68d6b9..e1b5eb4b4 100644 --- a/plugins/modules/gcp_compute_url_map_info.py +++ b/plugins/modules/gcp_compute_url_map_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP UrlMap short_description: Gather info for GCP UrlMap -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -77,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -2469,7 +2470,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_compute_vpn_tunnel.py b/plugins/modules/gcp_compute_vpn_tunnel.py index 5377ce2b5..afb318d2f 100644 --- a/plugins/modules/gcp_compute_vpn_tunnel.py +++ b/plugins/modules/gcp_compute_vpn_tunnel.py @@ -33,7 +33,6 @@ description: - VPN tunnel resource. short_description: Creates a GCP VpnTunnel -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -154,6 +153,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_compute_vpn_tunnel_info.py b/plugins/modules/gcp_compute_vpn_tunnel_info.py index 4077f3f0d..e67597503 100644 --- a/plugins/modules/gcp_compute_vpn_tunnel_info.py +++ b/plugins/modules/gcp_compute_vpn_tunnel_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP VpnTunnel short_description: Gather info for GCP VpnTunnel -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -46,6 +45,7 @@ - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . type: list + elements: str region: description: - The region where the tunnel is located. @@ -82,6 +82,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -202,7 +203,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_container_cluster.py b/plugins/modules/gcp_container_cluster.py index 80a06ca3d..ee65a8524 100644 --- a/plugins/modules/gcp_container_cluster.py +++ b/plugins/modules/gcp_container_cluster.py @@ -33,7 +33,6 @@ description: - A Google Container Engine cluster. short_description: Creates a GCP Cluster -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -179,7 +178,6 @@ elements: dict required: false type: list - version_added: '2.9' suboptions: accelerator_count: description: @@ -197,14 +195,12 @@ If unspecified, the default disk type is 'pd-standard' . required: false type: str - version_added: '2.9' min_cpu_platform: description: - Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. required: false type: str - version_added: '2.9' taints: description: - List of kubernetes taints to be applied to each node. @@ -213,7 +209,6 @@ elements: dict required: false type: list - version_added: '2.9' suboptions: key: description: @@ -237,7 +232,6 @@ - Shielded Instance options. required: false type: dict - version_added: '2.10' suboptions: enable_secure_boot: description: @@ -281,7 +275,6 @@ is issued. required: false type: dict - version_added: '2.9' suboptions: issue_client_certificate: description: @@ -318,7 +311,6 @@ - Configuration for a private cluster. required: false type: dict - version_added: '2.8' suboptions: enable_private_nodes: description: @@ -354,7 +346,6 @@ . required: false type: bool - version_added: '2.9' addons_config: description: - Configurations for the various addons available to run in the cluster. @@ -397,7 +388,6 @@ for the nodes. required: false type: dict - version_added: '2.9' suboptions: disabled: description: @@ -418,20 +408,17 @@ type: list aliases: - nodeLocations - version_added: '2.9' resource_labels: description: - The resource labels for the cluster to use to annotate any related Google Compute Engine resources. required: false type: dict - version_added: '2.9' legacy_abac: description: - Configuration for the legacy ABAC authorization mode. required: false type: dict - version_added: '2.9' suboptions: enabled: description: @@ -446,7 +433,6 @@ - Configuration options for the NetworkPolicy feature. required: false type: dict - version_added: '2.9' suboptions: provider: description: @@ -466,7 +452,6 @@ - Only honored if cluster created with IP Alias support. required: false type: dict - version_added: '2.9' suboptions: max_pods_per_node: description: @@ -478,7 +463,6 @@ - Configuration for controlling how IPs are allocated in the cluster. required: false type: dict - version_added: '2.9' suboptions: use_ip_aliases: description: @@ -553,13 +537,11 @@ when it was first created. The version can be upgraded over time. required: false type: str - version_added: '2.10' master_authorized_networks_config: description: - Configuration for controlling how IPs are allocated in the cluster. required: false type: dict - version_added: '2.10' suboptions: enabled: description: @@ -589,7 +571,6 @@ - Configuration for the BinaryAuthorization feature. required: false type: dict - version_added: '2.10' suboptions: enabled: description: @@ -603,7 +584,6 @@ type: str aliases: - zone - version_added: '2.8' kubectl_path: description: - The path that the kubectl config file will be written to. @@ -612,14 +592,12 @@ - This requires the PyYaml library. required: false type: str - version_added: '2.9' kubectl_context: description: - The name of the context for the kubectl config file. Will default to the cluster name. required: false type: str - version_added: '2.9' project: description: - The Google Cloud Platform project to use. @@ -651,6 +629,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -1717,9 +1696,7 @@ def _contents(self): return { 'apiVersion': 'v1', - 'clusters': [ - {'name': context, 'cluster': {'certificate-authority-data': str(self.fetch['masterAuth']['clusterCaCertificate']), 'server': endpoint,}} - ], + 'clusters': [{'name': context, 'cluster': {'certificate-authority-data': str(self.fetch['masterAuth']['clusterCaCertificate'])}}], 'contexts': [{'name': context, 'context': {'cluster': context, 'user': context}}], 'current-context': context, 'kind': 'Config', diff --git a/plugins/modules/gcp_container_cluster_info.py b/plugins/modules/gcp_container_cluster_info.py index 3581299bc..b906f1922 100644 --- a/plugins/modules/gcp_container_cluster_info.py +++ b/plugins/modules/gcp_container_cluster_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Cluster short_description: Gather info for GCP Cluster -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -48,7 +47,6 @@ aliases: - region - zone - version_added: '2.8' project: description: - The Google Cloud Platform project to use. @@ -80,6 +78,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -763,7 +762,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_container_node_pool.py b/plugins/modules/gcp_container_node_pool.py index af2c3548c..351428ea9 100644 --- a/plugins/modules/gcp_container_node_pool.py +++ b/plugins/modules/gcp_container_node_pool.py @@ -37,7 +37,6 @@ applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload. short_description: Creates a GCP NodePool -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -158,7 +157,6 @@ elements: dict required: false type: list - version_added: '2.9' suboptions: accelerator_count: description: @@ -176,21 +174,18 @@ If unspecified, the default disk type is 'pd-standard' . required: false type: str - version_added: '2.9' min_cpu_platform: description: - Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform . required: false type: str - version_added: '2.9' taints: description: - List of kubernetes taints to be applied to each node. elements: dict required: false type: list - version_added: '2.9' suboptions: key: description: @@ -212,7 +207,6 @@ - Shielded Instance options. required: false type: dict - version_added: '2.10' suboptions: enable_secure_boot: description: @@ -243,7 +237,6 @@ - The version of the Kubernetes of this node. required: false type: str - version_added: '2.8' autoscaling: description: - Autoscaler configuration for this NodePool. Autoscaler is enabled only if a @@ -300,7 +293,6 @@ on a node in the node pool. required: false type: dict - version_added: '2.9' suboptions: max_pods_per_node: description: @@ -313,7 +305,6 @@ elements: dict required: false type: list - version_added: '2.9' suboptions: code: description: @@ -340,7 +331,6 @@ aliases: - region - zone - version_added: '2.8' project: description: - The Google Cloud Platform project to use. @@ -372,6 +362,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_container_node_pool_info.py b/plugins/modules/gcp_container_node_pool_info.py index 8d2eb8c86..e2bceab7a 100644 --- a/plugins/modules/gcp_container_node_pool_info.py +++ b/plugins/modules/gcp_container_node_pool_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP NodePool short_description: Gather info for GCP NodePool -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -48,7 +47,6 @@ aliases: - region - zone - version_added: '2.8' cluster: description: - The cluster this node pool belongs to. @@ -90,6 +88,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -422,7 +421,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict import json ################################################################################ diff --git a/plugins/modules/gcp_dns_managed_zone.py b/plugins/modules/gcp_dns_managed_zone.py index 6ca0439fa..f39be1583 100644 --- a/plugins/modules/gcp_dns_managed_zone.py +++ b/plugins/modules/gcp_dns_managed_zone.py @@ -34,7 +34,6 @@ - A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service. short_description: Creates a GCP ManagedZone -version_added: '2.5' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -65,7 +64,6 @@ - DNSSEC configuration. required: false type: dict - version_added: '2.9' suboptions: kind: description: @@ -143,7 +141,6 @@ - A set of key/value label pairs to assign to this ManagedZone. required: false type: dict - version_added: '2.8' visibility: description: - 'The zone''s visibility: public zones are exposed to the Internet, while private @@ -152,14 +149,12 @@ required: false default: public type: str - version_added: '2.8' private_visibility_config: description: - For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. required: false type: dict - version_added: '2.8' suboptions: networks: description: @@ -182,7 +177,6 @@ to. required: false type: dict - version_added: '2.10' suboptions: target_name_servers: description: @@ -213,7 +207,6 @@ The value of this field contains the network to peer with. required: false type: dict - version_added: '2.10' suboptions: target_network: description: @@ -259,6 +252,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_dns_managed_zone_info.py b/plugins/modules/gcp_dns_managed_zone_info.py index 1dc717857..675b4ac50 100644 --- a/plugins/modules/gcp_dns_managed_zone_info.py +++ b/plugins/modules/gcp_dns_managed_zone_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP ManagedZone short_description: Gather info for GCP ManagedZone -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -44,6 +43,7 @@ description: - Restricts the list to return only zones with this domain name. type: list + elements: str project: description: - The Google Cloud Platform project to use. @@ -75,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -291,7 +292,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_dns_resource_record_set.py b/plugins/modules/gcp_dns_resource_record_set.py index 4e0abfeb6..956d6f318 100644 --- a/plugins/modules/gcp_dns_resource_record_set.py +++ b/plugins/modules/gcp_dns_resource_record_set.py @@ -37,7 +37,6 @@ - The record will include the domain/subdomain name, a type (i.e. A, AAA, CAA, MX, CNAME, NS, etc) . short_description: Creates a GCP ResourceRecordSet -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -113,6 +112,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_dns_resource_record_set_info.py b/plugins/modules/gcp_dns_resource_record_set_info.py index a63519ca5..daabb869e 100644 --- a/plugins/modules/gcp_dns_resource_record_set_info.py +++ b/plugins/modules/gcp_dns_resource_record_set_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP ResourceRecordSet short_description: Gather info for GCP ResourceRecordSet -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -78,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -144,7 +144,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict import json ################################################################################ diff --git a/plugins/modules/gcp_filestore_instance.py b/plugins/modules/gcp_filestore_instance.py index 350fe60ae..a3270177d 100644 --- a/plugins/modules/gcp_filestore_instance.py +++ b/plugins/modules/gcp_filestore_instance.py @@ -33,7 +33,6 @@ description: - A Google Cloud Filestore instance. short_description: Creates a GCP Instance -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -150,6 +149,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_filestore_instance_info.py b/plugins/modules/gcp_filestore_instance_info.py index 6c97d115b..a5f772206 100644 --- a/plugins/modules/gcp_filestore_instance_info.py +++ b/plugins/modules/gcp_filestore_instance_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Instance short_description: Gather info for GCP Instance -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -197,7 +197,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_iam_role.py b/plugins/modules/gcp_iam_role.py index 98a690d6f..9dd0c9cc6 100644 --- a/plugins/modules/gcp_iam_role.py +++ b/plugins/modules/gcp_iam_role.py @@ -33,7 +33,6 @@ description: - A role in the Identity and Access Management API . short_description: Creates a GCP Role -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -108,6 +107,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_iam_role_info.py b/plugins/modules/gcp_iam_role_info.py index 15172c92b..c15a5614f 100644 --- a/plugins/modules/gcp_iam_role_info.py +++ b/plugins/modules/gcp_iam_role_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Role short_description: Gather info for GCP Role -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -140,7 +140,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_iam_service_account.py b/plugins/modules/gcp_iam_service_account.py index ff0f29004..bdbfd5ad8 100644 --- a/plugins/modules/gcp_iam_service_account.py +++ b/plugins/modules/gcp_iam_service_account.py @@ -33,7 +33,6 @@ description: - A service account in the Identity and Access Management API. short_description: Creates a GCP ServiceAccount -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -89,6 +88,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_iam_service_account_info.py b/plugins/modules/gcp_iam_service_account_info.py index 579fac729..d1898a42d 100644 --- a/plugins/modules/gcp_iam_service_account_info.py +++ b/plugins/modules/gcp_iam_service_account_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP ServiceAccount short_description: Gather info for GCP ServiceAccount -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -139,7 +139,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_iam_service_account_key.py b/plugins/modules/gcp_iam_service_account_key.py index 3ed3fb900..53a9a901a 100644 --- a/plugins/modules/gcp_iam_service_account_key.py +++ b/plugins/modules/gcp_iam_service_account_key.py @@ -33,7 +33,6 @@ description: - A service account in the Identity and Access Management API. short_description: Creates a GCP ServiceAccountKey -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -108,6 +107,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -198,7 +198,7 @@ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict from ansible.module_utils._text import to_native import json import os diff --git a/plugins/modules/gcp_kms_crypto_key.py b/plugins/modules/gcp_kms_crypto_key.py index 2662e8901..f22eb682b 100644 --- a/plugins/modules/gcp_kms_crypto_key.py +++ b/plugins/modules/gcp_kms_crypto_key.py @@ -33,7 +33,6 @@ description: - A `CryptoKey` represents a logical key that can be used for cryptographic operations. short_description: Creates a GCP CryptoKey -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -131,6 +130,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_kms_crypto_key_info.py b/plugins/modules/gcp_kms_crypto_key_info.py index 1908c8bda..3e7e131bb 100644 --- a/plugins/modules/gcp_kms_crypto_key_info.py +++ b/plugins/modules/gcp_kms_crypto_key_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP CryptoKey short_description: Gather info for GCP CryptoKey -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -77,6 +76,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -176,7 +176,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_kms_key_ring.py b/plugins/modules/gcp_kms_key_ring.py index 665881f52..2043f66a0 100644 --- a/plugins/modules/gcp_kms_key_ring.py +++ b/plugins/modules/gcp_kms_key_ring.py @@ -33,7 +33,6 @@ description: - A `KeyRing` is a toplevel logical grouping of `CryptoKeys`. short_description: Creates a GCP KeyRing -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -91,6 +90,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_kms_key_ring_info.py b/plugins/modules/gcp_kms_key_ring_info.py index c7bc16b88..231e50007 100644 --- a/plugins/modules/gcp_kms_key_ring_info.py +++ b/plugins/modules/gcp_kms_key_ring_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP KeyRing short_description: Gather info for GCP KeyRing -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -78,6 +77,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -135,7 +135,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_logging_metric.py b/plugins/modules/gcp_logging_metric.py index f1d3c1673..9a2f4b9af 100644 --- a/plugins/modules/gcp_logging_metric.py +++ b/plugins/modules/gcp_logging_metric.py @@ -35,7 +35,6 @@ of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options. short_description: Creates a GCP Metric -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -258,6 +257,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_logging_metric_info.py b/plugins/modules/gcp_logging_metric_info.py index 6d3466841..c00ef6dcf 100644 --- a/plugins/modules/gcp_logging_metric_info.py +++ b/plugins/modules/gcp_logging_metric_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Metric short_description: Gather info for GCP Metric -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -286,7 +286,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_mlengine_model.py b/plugins/modules/gcp_mlengine_model.py index 5d947bf2e..f657169b3 100644 --- a/plugins/modules/gcp_mlengine_model.py +++ b/plugins/modules/gcp_mlengine_model.py @@ -35,7 +35,6 @@ - A model can have multiple versions, each of which is a deployed, trained model ready to receive prediction requests. The model itself is just a container. short_description: Creates a GCP Model -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -126,6 +125,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_mlengine_model_info.py b/plugins/modules/gcp_mlengine_model_info.py index 8cb48a3c8..8aaa74ac6 100644 --- a/plugins/modules/gcp_mlengine_model_info.py +++ b/plugins/modules/gcp_mlengine_model_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Model short_description: Gather info for GCP Model -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -153,7 +153,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_mlengine_version.py b/plugins/modules/gcp_mlengine_version.py index 8042d8293..27ee91ab2 100644 --- a/plugins/modules/gcp_mlengine_version.py +++ b/plugins/modules/gcp_mlengine_version.py @@ -34,7 +34,6 @@ - Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions . short_description: Creates a GCP Version -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -189,6 +188,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_mlengine_version_info.py b/plugins/modules/gcp_mlengine_version_info.py index 1385382b6..440881cac 100644 --- a/plugins/modules/gcp_mlengine_version_info.py +++ b/plugins/modules/gcp_mlengine_version_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Version short_description: Gather info for GCP Version -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -81,6 +80,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -244,7 +244,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict import json ################################################################################ diff --git a/plugins/modules/gcp_pubsub_subscription.py b/plugins/modules/gcp_pubsub_subscription.py index c016a9217..a674b7ce6 100644 --- a/plugins/modules/gcp_pubsub_subscription.py +++ b/plugins/modules/gcp_pubsub_subscription.py @@ -34,7 +34,6 @@ - A named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application. short_description: Creates a GCP Subscription -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -69,7 +68,6 @@ - A set of key/value label pairs to assign to this Subscription. required: false type: dict - version_added: '2.8' push_config: description: - If push delivery is used with this subscription, this field is used to configure @@ -84,7 +82,6 @@ header in the HTTP request for every pushed message. required: false type: dict - version_added: '2.10' suboptions: service_account_email: description: @@ -160,7 +157,6 @@ required: false default: 604800s type: str - version_added: '2.8' retain_acked_messages: description: - Indicates whether to retain acknowledged messages. If `true`, then messages @@ -168,7 +164,6 @@ until they fall out of the messageRetentionDuration window. required: false type: bool - version_added: '2.8' expiration_policy: description: - A policy that specifies the conditions for this subscription's expiration. @@ -179,7 +174,6 @@ value for expirationPolicy.ttl is 1 day. required: false type: dict - version_added: '2.9' suboptions: ttl: description: @@ -199,13 +193,12 @@ must have permission to Acknowledge() messages on this subscription. required: false type: dict - version_added: '2.10' suboptions: dead_letter_topic: description: - The name of the topic to which dead letter messages should be published. - Format is `projects/{project}/topics/{topic}`. - - The Cloud Pub/Sub service\naccount associated with the enclosing subscription's + - The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. - The operation will fail if the topic does not exist. @@ -257,6 +250,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -443,7 +437,7 @@ description: - The name of the topic to which dead letter messages should be published. - Format is `projects/{project}/topics/{topic}`. - - The Cloud Pub/Sub service\naccount associated with the enclosing subscription's + - The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. - The operation will fail if the topic does not exist. diff --git a/plugins/modules/gcp_pubsub_subscription_info.py b/plugins/modules/gcp_pubsub_subscription_info.py index d29e3c78c..8bef0f0af 100644 --- a/plugins/modules/gcp_pubsub_subscription_info.py +++ b/plugins/modules/gcp_pubsub_subscription_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Subscription short_description: Gather info for GCP Subscription -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -250,7 +250,7 @@ description: - The name of the topic to which dead letter messages should be published. - Format is `projects/{project}/topics/{topic}`. - - The Cloud Pub/Sub service\naccount associated with the enclosing subscription's + - The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. - The operation will fail if the topic does not exist. @@ -276,7 +276,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_pubsub_topic.py b/plugins/modules/gcp_pubsub_topic.py index 5defd263b..105fa4139 100644 --- a/plugins/modules/gcp_pubsub_topic.py +++ b/plugins/modules/gcp_pubsub_topic.py @@ -33,7 +33,6 @@ description: - A named resource to which messages are sent by publishers. short_description: Creates a GCP Topic -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -61,13 +60,11 @@ - The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*` . required: false type: str - version_added: '2.9' labels: description: - A set of key/value label pairs to assign to this Topic. required: false type: dict - version_added: '2.8' message_storage_policy: description: - Policy constraining the set of Google Cloud Platform regions where messages @@ -75,7 +72,6 @@ in effect. required: false type: dict - version_added: '2.9' suboptions: allowed_persistence_regions: description: @@ -118,6 +114,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_pubsub_topic_info.py b/plugins/modules/gcp_pubsub_topic_info.py index d0d70c802..dc628b70c 100644 --- a/plugins/modules/gcp_pubsub_topic_info.py +++ b/plugins/modules/gcp_pubsub_topic_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Topic short_description: Gather info for GCP Topic -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -145,7 +145,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_redis_instance.py b/plugins/modules/gcp_redis_instance.py index 2eb25a8d7..b496578e2 100644 --- a/plugins/modules/gcp_redis_instance.py +++ b/plugins/modules/gcp_redis_instance.py @@ -33,7 +33,6 @@ description: - A Google Cloud Redis instance. short_description: Creates a GCP Instance -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -68,7 +67,6 @@ required: false default: DIRECT_PEERING type: str - version_added: '2.10' display_name: description: - An arbitrary and optional user-provided name for the instance. @@ -165,6 +163,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_redis_instance_info.py b/plugins/modules/gcp_redis_instance_info.py index 92de1cbd0..c4d06acd6 100644 --- a/plugins/modules/gcp_redis_instance_info.py +++ b/plugins/modules/gcp_redis_instance_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Instance short_description: Gather info for GCP Instance -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -230,7 +230,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_resourcemanager_project.py b/plugins/modules/gcp_resourcemanager_project.py index d0e579a59..a9b0f5aec 100644 --- a/plugins/modules/gcp_resourcemanager_project.py +++ b/plugins/modules/gcp_resourcemanager_project.py @@ -34,7 +34,6 @@ - Represents a GCP Project. A project is a container for ACLs, APIs, App Engine Apps, VMs, and other Google Cloud Platform resources. short_description: Creates a GCP Project -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -122,6 +121,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_resourcemanager_project_info.py b/plugins/modules/gcp_resourcemanager_project_info.py index 161d9fb23..039071d72 100644 --- a/plugins/modules/gcp_resourcemanager_project_info.py +++ b/plugins/modules/gcp_resourcemanager_project_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Project short_description: Gather info for GCP Project -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -166,7 +166,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_runtimeconfig_config.py b/plugins/modules/gcp_runtimeconfig_config.py index 0d210be5f..20ae1eb0a 100644 --- a/plugins/modules/gcp_runtimeconfig_config.py +++ b/plugins/modules/gcp_runtimeconfig_config.py @@ -34,7 +34,6 @@ - A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig service. - A RuntimeConfig resource consists of metadata and a hierarchy of variables. short_description: Creates a GCP Config -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -90,6 +89,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_runtimeconfig_config_info.py b/plugins/modules/gcp_runtimeconfig_config_info.py index 38a5349be..0adfe83e7 100644 --- a/plugins/modules/gcp_runtimeconfig_config_info.py +++ b/plugins/modules/gcp_runtimeconfig_config_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Config short_description: Gather info for GCP Config -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -119,7 +119,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_runtimeconfig_variable.py b/plugins/modules/gcp_runtimeconfig_variable.py index fa4c1f68b..20460afac 100644 --- a/plugins/modules/gcp_runtimeconfig_variable.py +++ b/plugins/modules/gcp_runtimeconfig_variable.py @@ -33,7 +33,6 @@ description: - Describes a single variable within a runtime config resource. short_description: Creates a GCP Variable -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -99,6 +98,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_runtimeconfig_variable_info.py b/plugins/modules/gcp_runtimeconfig_variable_info.py index d06e7ee49..d97b6d2e4 100644 --- a/plugins/modules/gcp_runtimeconfig_variable_info.py +++ b/plugins/modules/gcp_runtimeconfig_variable_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Variable short_description: Gather info for GCP Variable -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -135,7 +135,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_serviceusage_service.py b/plugins/modules/gcp_serviceusage_service.py index 5ec12a682..0bccc0ee9 100644 --- a/plugins/modules/gcp_serviceusage_service.py +++ b/plugins/modules/gcp_serviceusage_service.py @@ -33,7 +33,6 @@ description: - A service that is available for use . short_description: Creates a GCP Service -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -90,6 +89,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_serviceusage_service_info.py b/plugins/modules/gcp_serviceusage_service_info.py index 291344ebb..5651384ae 100644 --- a/plugins/modules/gcp_serviceusage_service_info.py +++ b/plugins/modules/gcp_serviceusage_service_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Service short_description: Gather info for GCP Service -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -162,7 +162,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_sourcerepo_repository.py b/plugins/modules/gcp_sourcerepo_repository.py index 1fae597cc..052872d29 100644 --- a/plugins/modules/gcp_sourcerepo_repository.py +++ b/plugins/modules/gcp_sourcerepo_repository.py @@ -33,7 +33,6 @@ description: - A repository (or repo) is a Git repository storing versioned source content. short_description: Creates a GCP Repository -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -86,6 +85,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_sourcerepo_repository_info.py b/plugins/modules/gcp_sourcerepo_repository_info.py index 7f630b772..536b970b6 100644 --- a/plugins/modules/gcp_sourcerepo_repository_info.py +++ b/plugins/modules/gcp_sourcerepo_repository_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Repository short_description: Gather info for GCP Repository -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -126,7 +126,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_spanner_database.py b/plugins/modules/gcp_spanner_database.py index 333c7a7e9..31c554873 100644 --- a/plugins/modules/gcp_spanner_database.py +++ b/plugins/modules/gcp_spanner_database.py @@ -33,7 +33,6 @@ description: - A Cloud Spanner Database which is hosted on a Spanner instance. short_description: Creates a GCP Database -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -104,6 +103,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_spanner_database_info.py b/plugins/modules/gcp_spanner_database_info.py index 223086b17..fd6b76057 100644 --- a/plugins/modules/gcp_spanner_database_info.py +++ b/plugins/modules/gcp_spanner_database_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Database short_description: Gather info for GCP Database -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -81,6 +80,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -139,7 +139,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict import json ################################################################################ diff --git a/plugins/modules/gcp_spanner_instance.py b/plugins/modules/gcp_spanner_instance.py index 3e2bdb014..268ecbfb0 100644 --- a/plugins/modules/gcp_spanner_instance.py +++ b/plugins/modules/gcp_spanner_instance.py @@ -33,7 +33,6 @@ description: - An isolated set of Cloud Spanner resources on which databases can be hosted. short_description: Creates a GCP Instance -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -113,6 +112,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_spanner_instance_info.py b/plugins/modules/gcp_spanner_instance_info.py index 35ae75b09..abb5e8ec3 100644 --- a/plugins/modules/gcp_spanner_instance_info.py +++ b/plugins/modules/gcp_spanner_instance_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Instance short_description: Gather info for GCP Instance -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -142,7 +142,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_sql_database.py b/plugins/modules/gcp_sql_database.py index 7242890d1..cad8e7664 100644 --- a/plugins/modules/gcp_sql_database.py +++ b/plugins/modules/gcp_sql_database.py @@ -33,7 +33,6 @@ description: - Represents a SQL database inside the Cloud SQL instance, hosted in Google's cloud. short_description: Creates a GCP Database -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -106,6 +105,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_sql_database_info.py b/plugins/modules/gcp_sql_database_info.py index a3a54cf6a..f832da36a 100644 --- a/plugins/modules/gcp_sql_database_info.py +++ b/plugins/modules/gcp_sql_database_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Database short_description: Gather info for GCP Database -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -142,7 +142,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_sql_instance.py b/plugins/modules/gcp_sql_instance.py index 865364403..b2504f1a3 100644 --- a/plugins/modules/gcp_sql_instance.py +++ b/plugins/modules/gcp_sql_instance.py @@ -35,7 +35,6 @@ Google's cloud. The Instances resource provides methods for common configuration and management tasks. short_description: Creates a GCP Instance -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -229,7 +228,6 @@ elements: dict required: false type: list - version_added: '2.9' suboptions: name: description: @@ -331,13 +329,11 @@ single key value pair. required: false type: dict - version_added: '2.10' disk_encryption_configuration: description: - Disk encyption settings. required: false type: dict - version_added: '2.10' suboptions: kms_key_name: description: @@ -349,7 +345,6 @@ - Disk encyption status. required: false type: dict - version_added: '2.10' suboptions: kms_key_version_name: description: @@ -387,6 +382,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_sql_instance_info.py b/plugins/modules/gcp_sql_instance_info.py index c82749428..7d336a115 100644 --- a/plugins/modules/gcp_sql_instance_info.py +++ b/plugins/modules/gcp_sql_instance_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Instance short_description: Gather info for GCP Instance -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -71,6 +70,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -497,7 +497,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ diff --git a/plugins/modules/gcp_sql_ssl_cert.py b/plugins/modules/gcp_sql_ssl_cert.py index 3280a3de7..45609be4e 100644 --- a/plugins/modules/gcp_sql_ssl_cert.py +++ b/plugins/modules/gcp_sql_ssl_cert.py @@ -36,7 +36,6 @@ Client Key can be downloaded only when the SSL certificate is created with the insert method. short_description: Creates a GCP SslCert -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -122,6 +121,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_sql_user.py b/plugins/modules/gcp_sql_user.py index d6fd72892..50e5ed45d 100644 --- a/plugins/modules/gcp_sql_user.py +++ b/plugins/modules/gcp_sql_user.py @@ -33,7 +33,6 @@ description: - The Users resource represents a database user in a Cloud SQL instance. short_description: Creates a GCP User -version_added: '2.7' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -106,6 +105,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_sql_user_info.py b/plugins/modules/gcp_sql_user_info.py index f2ddc6cbe..c0545a5b0 100644 --- a/plugins/modules/gcp_sql_user_info.py +++ b/plugins/modules/gcp_sql_user_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP User short_description: Gather info for GCP User -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -81,6 +80,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -142,7 +142,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest, replace_resource_dict import json ################################################################################ diff --git a/plugins/modules/gcp_storage_bucket.py b/plugins/modules/gcp_storage_bucket.py index 385843a64..79f6ec121 100644 --- a/plugins/modules/gcp_storage_bucket.py +++ b/plugins/modules/gcp_storage_bucket.py @@ -38,7 +38,6 @@ manipulation of an existing bucket's access controls. - A bucket is always owned by the project team owners group. short_description: Creates a GCP Bucket -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -150,14 +149,12 @@ to the bucket. required: false type: bool - version_added: '2.10' default_object_acl: description: - Default access controls to apply to new objects when no ACL is provided. elements: dict required: false type: list - version_added: '2.7' suboptions: bucket: description: @@ -359,7 +356,6 @@ - Labels applied to this bucket. A list of key->value pairs. required: false type: dict - version_added: '2.10' project: description: - The Google Cloud Platform project to use. @@ -408,6 +404,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_storage_bucket_access_control.py b/plugins/modules/gcp_storage_bucket_access_control.py index afd20c9e0..94a270bf7 100644 --- a/plugins/modules/gcp_storage_bucket_access_control.py +++ b/plugins/modules/gcp_storage_bucket_access_control.py @@ -42,7 +42,6 @@ see Access Control, with the caveat that this API uses READER, WRITER, and OWNER instead of READ, WRITE, and FULL_CONTROL.' short_description: Creates a GCP BucketAccessControl -version_added: '2.6' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -114,6 +113,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_storage_default_object_acl.py b/plugins/modules/gcp_storage_default_object_acl.py index d1cedf99c..e23f4b45a 100644 --- a/plugins/modules/gcp_storage_default_object_acl.py +++ b/plugins/modules/gcp_storage_default_object_acl.py @@ -43,7 +43,6 @@ - For more information, see Access Control, with the caveat that this API uses READER and OWNER instead of READ and FULL_CONTROL. short_description: Creates a GCP DefaultObjectACL -version_added: '2.10' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -118,6 +117,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_tpu_node.py b/plugins/modules/gcp_tpu_node.py index 799ffa4cf..85cb0425c 100644 --- a/plugins/modules/gcp_tpu_node.py +++ b/plugins/modules/gcp_tpu_node.py @@ -33,7 +33,6 @@ description: - A Cloud TPU instance. short_description: Creates a GCP Node -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -139,6 +138,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. diff --git a/plugins/modules/gcp_tpu_node_info.py b/plugins/modules/gcp_tpu_node_info.py index b7f6fbf95..27e98ef11 100644 --- a/plugins/modules/gcp_tpu_node_info.py +++ b/plugins/modules/gcp_tpu_node_info.py @@ -33,7 +33,6 @@ description: - Gather info for GCP Node short_description: Gather info for GCP Node -version_added: '2.9' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -76,6 +75,7 @@ description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -200,7 +200,7 @@ ################################################################################ # Imports ################################################################################ -from ansible.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import navigate_hash, GcpSession, GcpModule, GcpRequest import json ################################################################################ From 8f8743e4366381f9aec61d949ad73b5a280d2577 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 11 Aug 2020 11:18:16 -0700 Subject: [PATCH 04/11] Add new field filter to pubsub. (#3759) (#275) * Add new field filter to pubsub. Fixes: https://github.com/terraform-providers/terraform-provider-google/issues/6727 * Fixed filter name, it was improperly set. * add filter key to pubsub subscription unit test * spaces not tabs! * hardcode filter value in test * revert remove escaped quotes Co-authored-by: Tim O'Connell Signed-off-by: Modular Magician Co-authored-by: Tim O'Connell --- plugins/modules/gcp_pubsub_subscription.py | 19 +++++++++++++++++++ .../modules/gcp_pubsub_subscription_info.py | 8 ++++++++ 2 files changed, 27 insertions(+) diff --git a/plugins/modules/gcp_pubsub_subscription.py b/plugins/modules/gcp_pubsub_subscription.py index a674b7ce6..daa10e582 100644 --- a/plugins/modules/gcp_pubsub_subscription.py +++ b/plugins/modules/gcp_pubsub_subscription.py @@ -184,6 +184,14 @@ - Example - "3.5s". required: true type: str + filter: + description: + - The subscription only delivers the messages that match the filter. Pub/Sub automatically + acknowledges the messages that don't match the filter. You can filter messages + by their attributes. The maximum length of a filter is 256 bytes. After creating + the subscription, you can't modify the filter. + required: false + type: str dead_letter_policy: description: - A policy that specifies the conditions for dead lettering messages in this subscription. @@ -423,6 +431,14 @@ - Example - "3.5s". returned: success type: str +filter: + description: + - The subscription only delivers the messages that match the filter. Pub/Sub automatically + acknowledges the messages that don't match the filter. You can filter messages + by their attributes. The maximum length of a filter is 256 bytes. After creating + the subscription, you can't modify the filter. + returned: success + type: str deadLetterPolicy: description: - A policy that specifies the conditions for dead lettering messages in this subscription. @@ -501,6 +517,7 @@ def main(): message_retention_duration=dict(default='604800s', type='str'), retain_acked_messages=dict(type='bool'), expiration_policy=dict(type='dict', options=dict(ttl=dict(required=True, type='str'))), + filter=dict(type='str'), dead_letter_policy=dict(type='dict', options=dict(dead_letter_topic=dict(type='str'), max_delivery_attempts=dict(type='int'))), ) ) @@ -582,6 +599,7 @@ def resource_to_request(module): u'messageRetentionDuration': module.params.get('message_retention_duration'), u'retainAckedMessages': module.params.get('retain_acked_messages'), u'expirationPolicy': SubscriptionExpirationpolicy(module.params.get('expiration_policy', {}), module).to_request(), + u'filter': module.params.get('filter'), u'deadLetterPolicy': SubscriptionDeadletterpolicy(module.params.get('dead_letter_policy', {}), module).to_request(), } return_vals = {} @@ -656,6 +674,7 @@ def response_to_hash(module, response): u'messageRetentionDuration': response.get(u'messageRetentionDuration'), u'retainAckedMessages': response.get(u'retainAckedMessages'), u'expirationPolicy': SubscriptionExpirationpolicy(response.get(u'expirationPolicy', {}), module).from_response(), + u'filter': module.params.get('filter'), u'deadLetterPolicy': SubscriptionDeadletterpolicy(response.get(u'deadLetterPolicy', {}), module).from_response(), } diff --git a/plugins/modules/gcp_pubsub_subscription_info.py b/plugins/modules/gcp_pubsub_subscription_info.py index 8bef0f0af..52eb3c24e 100644 --- a/plugins/modules/gcp_pubsub_subscription_info.py +++ b/plugins/modules/gcp_pubsub_subscription_info.py @@ -236,6 +236,14 @@ - Example - "3.5s". returned: success type: str + filter: + description: + - The subscription only delivers the messages that match the filter. Pub/Sub + automatically acknowledges the messages that don't match the filter. You can + filter messages by their attributes. The maximum length of a filter is 256 + bytes. After creating the subscription, you can't modify the filter. + returned: success + type: str deadLetterPolicy: description: - A policy that specifies the conditions for dead lettering messages in this From b25530419c000c003595db7891d855dc078488fe Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 14 Aug 2020 09:50:52 -0700 Subject: [PATCH 05/11] Add archive class to gcs (#3867) (#276) Signed-off-by: Modular Magician --- plugins/modules/gcp_storage_bucket.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/modules/gcp_storage_bucket.py b/plugins/modules/gcp_storage_bucket.py index 79f6ec121..442a30dd1 100644 --- a/plugins/modules/gcp_storage_bucket.py +++ b/plugins/modules/gcp_storage_bucket.py @@ -249,7 +249,7 @@ description: - Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, - COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. + COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. elements: str required: false type: list @@ -310,11 +310,11 @@ - The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. - - Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. - If this value is not specified when the bucket is created, it will default to - STANDARD. For more information, see storage classes. + - Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, + and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket + is created, it will default to STANDARD. For more information, see storage classes. - 'Some valid choices include: "MULTI_REGIONAL", "REGIONAL", "STANDARD", "NEARLINE", - "COLDLINE", "DURABLE_REDUCED_AVAILABILITY"' + "COLDLINE", "ARCHIVE", "DURABLE_REDUCED_AVAILABILITY"' required: false type: str versioning: @@ -659,7 +659,7 @@ description: - Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, - COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. + COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. returned: success type: list numNewerVersions: @@ -729,9 +729,9 @@ - The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. - - Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. - If this value is not specified when the bucket is created, it will default to - STANDARD. For more information, see storage classes. + - Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, + and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket + is created, it will default to STANDARD. For more information, see storage classes. returned: success type: str timeCreated: From 74aa87d50f9f102df4ee9131b218902d889581b1 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 17 Aug 2020 09:13:32 -0700 Subject: [PATCH 06/11] Add support for gRPC healthchecks (#3825) (#277) Signed-off-by: Modular Magician --- plugins/modules/gcp_compute_health_check.py | 119 ++++++++++++++++++ .../modules/gcp_compute_health_check_info.py | 43 +++++++ .../gcp_compute_region_health_check.py | 119 ++++++++++++++++++ .../gcp_compute_region_health_check_info.py | 43 +++++++ 4 files changed, 324 insertions(+) diff --git a/plugins/modules/gcp_compute_health_check.py b/plugins/modules/gcp_compute_health_check.py index 81a8eb713..094f9079b 100644 --- a/plugins/modules/gcp_compute_health_check.py +++ b/plugins/modules/gcp_compute_health_check.py @@ -400,6 +400,49 @@ - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' required: false type: str + grpc_health_check: + description: + - A nested object resource. + required: false + type: dict + suboptions: + port: + description: + - The port number for the health check request. Must be specified if portName + and portSpecification are not set or if port_specification is USE_FIXED_PORT. + Valid values are 1 through 65535. + required: false + type: int + port_name: + description: + - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name + are defined, port takes precedence. + required: false + type: str + port_specification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health + checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health checking." + - If not specified, gRPC health check follows behavior specified in `port` + and `portName` fields. + - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' + required: false + type: str + grpc_service_name: + description: + - 'The gRPC service name for the health check. The value of grpcServiceName + has the following meanings by convention: - Empty serviceName means the + overall status of all services at the backend.' + - "- Non-empty serviceName means the health of that gRPC service, as defined + by the owner of the service." + - The grpcServiceName can only be ASCII. + required: false + type: str project: description: - The Google Cloud Platform project to use. @@ -792,6 +835,47 @@ and `portName` fields. returned: success type: str +grpcHealthCheck: + description: + - A nested object resource. + returned: success + type: complex + contains: + port: + description: + - The port number for the health check request. Must be specified if portName + and portSpecification are not set or if port_specification is USE_FIXED_PORT. + Valid values are 1 through 65535. + returned: success + type: int + portName: + description: + - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name + are defined, port takes precedence. + returned: success + type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the port + or named port specified in the Backend Service is used for health checking." + - If not specified, gRPC health check follows behavior specified in `port` and + `portName` fields. + returned: success + type: str + grpcServiceName: + description: + - 'The gRPC service name for the health check. The value of grpcServiceName + has the following meanings by convention: - Empty serviceName means the overall + status of all services at the backend.' + - "- Non-empty serviceName means the health of that gRPC service, as defined + by the owner of the service." + - The grpcServiceName can only be ASCII. + returned: success + type: str ''' ################################################################################ @@ -885,6 +969,10 @@ def main(): port_specification=dict(type='str'), ), ), + grpc_health_check=dict( + type='dict', + options=dict(port=dict(type='int'), port_name=dict(type='str'), port_specification=dict(type='str'), grpc_service_name=dict(type='str')), + ), ) ) @@ -949,6 +1037,7 @@ def resource_to_request(module): u'tcpHealthCheck': HealthCheckTcphealthcheck(module.params.get('tcp_health_check', {}), module).to_request(), u'sslHealthCheck': HealthCheckSslhealthcheck(module.params.get('ssl_health_check', {}), module).to_request(), u'http2HealthCheck': HealthCheckHttp2healthcheck(module.params.get('http2_health_check', {}), module).to_request(), + u'grpcHealthCheck': HealthCheckGrpchealthcheck(module.params.get('grpc_health_check', {}), module).to_request(), } return_vals = {} for k, v in request.items(): @@ -1028,6 +1117,7 @@ def response_to_hash(module, response): u'tcpHealthCheck': HealthCheckTcphealthcheck(response.get(u'tcpHealthCheck', {}), module).from_response(), u'sslHealthCheck': HealthCheckSslhealthcheck(response.get(u'sslHealthCheck', {}), module).from_response(), u'http2HealthCheck': HealthCheckHttp2healthcheck(response.get(u'http2HealthCheck', {}), module).from_response(), + u'grpcHealthCheck': HealthCheckGrpchealthcheck(response.get(u'grpcHealthCheck', {}), module).from_response(), } @@ -1237,5 +1327,34 @@ def from_response(self): ) +class HealthCheckGrpchealthcheck(object): + def __init__(self, request, module): + self.module = module + if request: + self.request = request + else: + self.request = {} + + def to_request(self): + return remove_nones_from_dict( + { + u'port': self.request.get('port'), + u'portName': self.request.get('port_name'), + u'portSpecification': self.request.get('port_specification'), + u'grpcServiceName': self.request.get('grpc_service_name'), + } + ) + + def from_response(self): + return remove_nones_from_dict( + { + u'port': self.request.get(u'port'), + u'portName': self.request.get(u'portName'), + u'portSpecification': self.request.get(u'portSpecification'), + u'grpcServiceName': self.request.get(u'grpcServiceName'), + } + ) + + if __name__ == '__main__': main() diff --git a/plugins/modules/gcp_compute_health_check_info.py b/plugins/modules/gcp_compute_health_check_info.py index 3762b1c1b..2ab3f278f 100644 --- a/plugins/modules/gcp_compute_health_check_info.py +++ b/plugins/modules/gcp_compute_health_check_info.py @@ -451,6 +451,49 @@ and `portName` fields. returned: success type: str + grpcHealthCheck: + description: + - A nested object resource. + returned: success + type: complex + contains: + port: + description: + - The port number for the health check request. Must be specified if portName + and portSpecification are not set or if port_specification is USE_FIXED_PORT. + Valid values are 1 through 65535. + returned: success + type: int + portName: + description: + - Port name as defined in InstanceGroup#NamedPort#name. If both port and + port_name are defined, port takes precedence. + returned: success + type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the + following values: * `USE_FIXED_PORT`: The port number in `port` is used + for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, + the port or named port specified in the Backend Service is used for health + checking." + - If not specified, gRPC health check follows behavior specified in `port` + and `portName` fields. + returned: success + type: str + grpcServiceName: + description: + - 'The gRPC service name for the health check. The value of grpcServiceName + has the following meanings by convention: - Empty serviceName means the + overall status of all services at the backend.' + - "- Non-empty serviceName means the health of that gRPC service, as defined + by the owner of the service." + - The grpcServiceName can only be ASCII. + returned: success + type: str ''' ################################################################################ diff --git a/plugins/modules/gcp_compute_region_health_check.py b/plugins/modules/gcp_compute_region_health_check.py index 8f8c544e8..ff2af5b82 100644 --- a/plugins/modules/gcp_compute_region_health_check.py +++ b/plugins/modules/gcp_compute_region_health_check.py @@ -398,6 +398,49 @@ - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' required: false type: str + grpc_health_check: + description: + - A nested object resource. + required: false + type: dict + suboptions: + port: + description: + - The port number for the health check request. Must be specified if portName + and portSpecification are not set or if port_specification is USE_FIXED_PORT. + Valid values are 1 through 65535. + required: false + type: int + port_name: + description: + - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name + are defined, port takes precedence. + required: false + type: str + port_specification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health + checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health checking." + - If not specified, gRPC health check follows behavior specified in `port` + and `portName` fields. + - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' + required: false + type: str + grpc_service_name: + description: + - 'The gRPC service name for the health check. The value of grpcServiceName + has the following meanings by convention: - Empty serviceName means the + overall status of all services at the backend.' + - "- Non-empty serviceName means the health of that gRPC service, as defined + by the owner of the service." + - The grpcServiceName can only be ASCII. + required: false + type: str region: description: - The region where the regional health check resides. @@ -796,6 +839,47 @@ and `portName` fields. returned: success type: str +grpcHealthCheck: + description: + - A nested object resource. + returned: success + type: complex + contains: + port: + description: + - The port number for the health check request. Must be specified if portName + and portSpecification are not set or if port_specification is USE_FIXED_PORT. + Valid values are 1 through 65535. + returned: success + type: int + portName: + description: + - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name + are defined, port takes precedence. + returned: success + type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the port + or named port specified in the Backend Service is used for health checking." + - If not specified, gRPC health check follows behavior specified in `port` and + `portName` fields. + returned: success + type: str + grpcServiceName: + description: + - 'The gRPC service name for the health check. The value of grpcServiceName + has the following meanings by convention: - Empty serviceName means the overall + status of all services at the backend.' + - "- Non-empty serviceName means the health of that gRPC service, as defined + by the owner of the service." + - The grpcServiceName can only be ASCII. + returned: success + type: str region: description: - The region where the regional health check resides. @@ -895,6 +979,10 @@ def main(): port_specification=dict(type='str'), ), ), + grpc_health_check=dict( + type='dict', + options=dict(port=dict(type='int'), port_name=dict(type='str'), port_specification=dict(type='str'), grpc_service_name=dict(type='str')), + ), region=dict(type='str'), ) ) @@ -961,6 +1049,7 @@ def resource_to_request(module): u'tcpHealthCheck': RegionHealthCheckTcphealthcheck(module.params.get('tcp_health_check', {}), module).to_request(), u'sslHealthCheck': RegionHealthCheckSslhealthcheck(module.params.get('ssl_health_check', {}), module).to_request(), u'http2HealthCheck': RegionHealthCheckHttp2healthcheck(module.params.get('http2_health_check', {}), module).to_request(), + u'grpcHealthCheck': RegionHealthCheckGrpchealthcheck(module.params.get('grpc_health_check', {}), module).to_request(), } return_vals = {} for k, v in request.items(): @@ -1040,6 +1129,7 @@ def response_to_hash(module, response): u'tcpHealthCheck': RegionHealthCheckTcphealthcheck(response.get(u'tcpHealthCheck', {}), module).from_response(), u'sslHealthCheck': RegionHealthCheckSslhealthcheck(response.get(u'sslHealthCheck', {}), module).from_response(), u'http2HealthCheck': RegionHealthCheckHttp2healthcheck(response.get(u'http2HealthCheck', {}), module).from_response(), + u'grpcHealthCheck': RegionHealthCheckGrpchealthcheck(response.get(u'grpcHealthCheck', {}), module).from_response(), } @@ -1258,5 +1348,34 @@ def from_response(self): ) +class RegionHealthCheckGrpchealthcheck(object): + def __init__(self, request, module): + self.module = module + if request: + self.request = request + else: + self.request = {} + + def to_request(self): + return remove_nones_from_dict( + { + u'port': self.request.get('port'), + u'portName': self.request.get('port_name'), + u'portSpecification': self.request.get('port_specification'), + u'grpcServiceName': self.request.get('grpc_service_name'), + } + ) + + def from_response(self): + return remove_nones_from_dict( + { + u'port': self.request.get(u'port'), + u'portName': self.request.get(u'portName'), + u'portSpecification': self.request.get(u'portSpecification'), + u'grpcServiceName': self.request.get(u'grpcServiceName'), + } + ) + + if __name__ == '__main__': main() diff --git a/plugins/modules/gcp_compute_region_health_check_info.py b/plugins/modules/gcp_compute_region_health_check_info.py index 3f28a668d..f8668d8ff 100644 --- a/plugins/modules/gcp_compute_region_health_check_info.py +++ b/plugins/modules/gcp_compute_region_health_check_info.py @@ -457,6 +457,49 @@ and `portName` fields. returned: success type: str + grpcHealthCheck: + description: + - A nested object resource. + returned: success + type: complex + contains: + port: + description: + - The port number for the health check request. Must be specified if portName + and portSpecification are not set or if port_specification is USE_FIXED_PORT. + Valid values are 1 through 65535. + returned: success + type: int + portName: + description: + - Port name as defined in InstanceGroup#NamedPort#name. If both port and + port_name are defined, port takes precedence. + returned: success + type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the + following values: * `USE_FIXED_PORT`: The port number in `port` is used + for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, + the port or named port specified in the Backend Service is used for health + checking." + - If not specified, gRPC health check follows behavior specified in `port` + and `portName` fields. + returned: success + type: str + grpcServiceName: + description: + - 'The gRPC service name for the health check. The value of grpcServiceName + has the following meanings by convention: - Empty serviceName means the + overall status of all services at the backend.' + - "- Non-empty serviceName means the health of that gRPC service, as defined + by the owner of the service." + - The grpcServiceName can only be ASCII. + returned: success + type: str region: description: - The region where the regional health check resides. From 85e17eef434dce589d8feca1046475b8b4108c38 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 17 Aug 2020 09:36:29 -0700 Subject: [PATCH 07/11] Add enableMessageOrdering to Pub/Sub Subscription (#3872) (#278) Add enableMessageOrdering to Pub/Sub Subscription Signed-off-by: Modular Magician --- plugins/modules/gcp_pubsub_subscription.py | 19 +++++++++++++++++++ .../modules/gcp_pubsub_subscription_info.py | 7 +++++++ 2 files changed, 26 insertions(+) diff --git a/plugins/modules/gcp_pubsub_subscription.py b/plugins/modules/gcp_pubsub_subscription.py index daa10e582..373f4e769 100644 --- a/plugins/modules/gcp_pubsub_subscription.py +++ b/plugins/modules/gcp_pubsub_subscription.py @@ -227,6 +227,13 @@ - If this parameter is 0, a default value of 5 is used. required: false type: int + enable_message_ordering: + description: + - If `true`, messages published with the same orderingKey in PubsubMessage will + be delivered to the subscribers in the order in which they are received by the + Pub/Sub system. Otherwise, they may be delivered in any order. + required: false + type: bool project: description: - The Google Cloud Platform project to use. @@ -474,6 +481,13 @@ - If this parameter is 0, a default value of 5 is used. returned: success type: int +enableMessageOrdering: + description: + - If `true`, messages published with the same orderingKey in PubsubMessage will + be delivered to the subscribers in the order in which they are received by the + Pub/Sub system. Otherwise, they may be delivered in any order. + returned: success + type: bool ''' ################################################################################ @@ -519,6 +533,7 @@ def main(): expiration_policy=dict(type='dict', options=dict(ttl=dict(required=True, type='str'))), filter=dict(type='str'), dead_letter_policy=dict(type='dict', options=dict(dead_letter_topic=dict(type='str'), max_delivery_attempts=dict(type='int'))), + enable_message_ordering=dict(type='bool'), ) ) @@ -581,6 +596,8 @@ def updateMask(request, response): update_mask.append('expirationPolicy') if request.get('deadLetterPolicy') != response.get('deadLetterPolicy'): update_mask.append('deadLetterPolicy') + if request.get('enableMessageOrdering') != response.get('enableMessageOrdering'): + update_mask.append('enableMessageOrdering') return ','.join(update_mask) @@ -601,6 +618,7 @@ def resource_to_request(module): u'expirationPolicy': SubscriptionExpirationpolicy(module.params.get('expiration_policy', {}), module).to_request(), u'filter': module.params.get('filter'), u'deadLetterPolicy': SubscriptionDeadletterpolicy(module.params.get('dead_letter_policy', {}), module).to_request(), + u'enableMessageOrdering': module.params.get('enable_message_ordering'), } return_vals = {} for k, v in request.items(): @@ -676,6 +694,7 @@ def response_to_hash(module, response): u'expirationPolicy': SubscriptionExpirationpolicy(response.get(u'expirationPolicy', {}), module).from_response(), u'filter': module.params.get('filter'), u'deadLetterPolicy': SubscriptionDeadletterpolicy(response.get(u'deadLetterPolicy', {}), module).from_response(), + u'enableMessageOrdering': response.get(u'enableMessageOrdering'), } diff --git a/plugins/modules/gcp_pubsub_subscription_info.py b/plugins/modules/gcp_pubsub_subscription_info.py index 52eb3c24e..457e61bee 100644 --- a/plugins/modules/gcp_pubsub_subscription_info.py +++ b/plugins/modules/gcp_pubsub_subscription_info.py @@ -279,6 +279,13 @@ - If this parameter is 0, a default value of 5 is used. returned: success type: int + enableMessageOrdering: + description: + - If `true`, messages published with the same orderingKey in PubsubMessage will + be delivered to the subscribers in the order in which they are received by + the Pub/Sub system. Otherwise, they may be delivered in any order. + returned: success + type: bool ''' ################################################################################ From 30b00dc6c5baa068cbb36326f7648db0397fadb1 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 17 Aug 2020 14:39:47 -0700 Subject: [PATCH 08/11] use {product}.googleapis.com endpoints (#3755) (#279) * use {product}.googleapis.com endpoints * use actual correct urls * fix zone data source test * fix network peering tests * possibly fix deleting default network Signed-off-by: Modular Magician --- plugins/modules/gcp_bigquery_dataset.py | 4 ++-- plugins/modules/gcp_bigquery_dataset_info.py | 2 +- plugins/modules/gcp_bigquery_table.py | 4 ++-- plugins/modules/gcp_bigquery_table_info.py | 2 +- plugins/modules/gcp_compute_address.py | 6 +++--- plugins/modules/gcp_compute_address_info.py | 2 +- plugins/modules/gcp_compute_autoscaler.py | 6 +++--- plugins/modules/gcp_compute_autoscaler_info.py | 2 +- plugins/modules/gcp_compute_backend_bucket.py | 6 +++--- .../modules/gcp_compute_backend_bucket_info.py | 2 +- plugins/modules/gcp_compute_backend_service.py | 8 ++++---- .../gcp_compute_backend_service_info.py | 2 +- plugins/modules/gcp_compute_disk.py | 14 +++++++------- plugins/modules/gcp_compute_disk_info.py | 2 +- .../gcp_compute_external_vpn_gateway.py | 6 +++--- .../gcp_compute_external_vpn_gateway_info.py | 2 +- plugins/modules/gcp_compute_firewall.py | 6 +++--- plugins/modules/gcp_compute_firewall_info.py | 2 +- plugins/modules/gcp_compute_forwarding_rule.py | 10 +++++----- .../gcp_compute_forwarding_rule_info.py | 2 +- plugins/modules/gcp_compute_global_address.py | 10 +++++----- .../modules/gcp_compute_global_address_info.py | 2 +- .../gcp_compute_global_forwarding_rule.py | 8 ++++---- .../gcp_compute_global_forwarding_rule_info.py | 2 +- plugins/modules/gcp_compute_health_check.py | 6 +++--- .../modules/gcp_compute_health_check_info.py | 2 +- .../modules/gcp_compute_http_health_check.py | 6 +++--- .../gcp_compute_http_health_check_info.py | 2 +- .../modules/gcp_compute_https_health_check.py | 6 +++--- .../gcp_compute_https_health_check_info.py | 2 +- plugins/modules/gcp_compute_image.py | 12 ++++++------ plugins/modules/gcp_compute_image_info.py | 2 +- plugins/modules/gcp_compute_instance.py | 18 +++++++++--------- plugins/modules/gcp_compute_instance_group.py | 10 +++++----- .../modules/gcp_compute_instance_group_info.py | 2 +- .../gcp_compute_instance_group_manager.py | 10 +++++----- .../gcp_compute_instance_group_manager_info.py | 2 +- plugins/modules/gcp_compute_instance_info.py | 2 +- .../modules/gcp_compute_instance_template.py | 10 +++++----- .../gcp_compute_instance_template_info.py | 2 +- .../gcp_compute_interconnect_attachment.py | 10 +++++----- ...gcp_compute_interconnect_attachment_info.py | 2 +- plugins/modules/gcp_compute_network.py | 8 ++++---- .../gcp_compute_network_endpoint_group.py | 6 +++--- .../gcp_compute_network_endpoint_group_info.py | 2 +- plugins/modules/gcp_compute_network_info.py | 2 +- plugins/modules/gcp_compute_node_group.py | 18 +++++++++--------- plugins/modules/gcp_compute_node_group_info.py | 2 +- plugins/modules/gcp_compute_node_template.py | 10 +++++----- .../modules/gcp_compute_node_template_info.py | 2 +- .../modules/gcp_compute_region_autoscaler.py | 6 +++--- .../gcp_compute_region_autoscaler_info.py | 2 +- .../gcp_compute_region_backend_service.py | 6 +++--- .../gcp_compute_region_backend_service_info.py | 2 +- plugins/modules/gcp_compute_region_disk.py | 18 +++++++++--------- .../modules/gcp_compute_region_disk_info.py | 2 +- .../modules/gcp_compute_region_health_check.py | 10 +++++----- .../gcp_compute_region_health_check_info.py | 2 +- ...cp_compute_region_instance_group_manager.py | 6 +++--- ...mpute_region_instance_group_manager_info.py | 2 +- .../gcp_compute_region_target_http_proxy.py | 10 ++++++---- ...cp_compute_region_target_http_proxy_info.py | 2 +- .../gcp_compute_region_target_https_proxy.py | 12 +++++++----- ...p_compute_region_target_https_proxy_info.py | 2 +- plugins/modules/gcp_compute_region_url_map.py | 6 +++--- .../modules/gcp_compute_region_url_map_info.py | 2 +- plugins/modules/gcp_compute_reservation.py | 8 ++++---- .../modules/gcp_compute_reservation_info.py | 2 +- plugins/modules/gcp_compute_resource_policy.py | 6 +++--- .../gcp_compute_resource_policy_info.py | 2 +- plugins/modules/gcp_compute_route.py | 6 +++--- plugins/modules/gcp_compute_route_info.py | 2 +- plugins/modules/gcp_compute_router.py | 6 +++--- plugins/modules/gcp_compute_router_info.py | 2 +- plugins/modules/gcp_compute_snapshot.py | 14 +++++++------- plugins/modules/gcp_compute_snapshot_info.py | 2 +- plugins/modules/gcp_compute_ssl_certificate.py | 6 +++--- .../gcp_compute_ssl_certificate_info.py | 2 +- plugins/modules/gcp_compute_ssl_policy.py | 6 +++--- plugins/modules/gcp_compute_ssl_policy_info.py | 2 +- plugins/modules/gcp_compute_subnetwork.py | 14 ++++++++------ plugins/modules/gcp_compute_subnetwork_info.py | 2 +- .../modules/gcp_compute_target_http_proxy.py | 8 ++++---- .../gcp_compute_target_http_proxy_info.py | 2 +- .../modules/gcp_compute_target_https_proxy.py | 14 +++++++------- .../gcp_compute_target_https_proxy_info.py | 2 +- plugins/modules/gcp_compute_target_instance.py | 6 +++--- .../gcp_compute_target_instance_info.py | 2 +- plugins/modules/gcp_compute_target_pool.py | 6 +++--- .../modules/gcp_compute_target_pool_info.py | 2 +- .../modules/gcp_compute_target_ssl_proxy.py | 14 +++++++------- .../gcp_compute_target_ssl_proxy_info.py | 2 +- .../modules/gcp_compute_target_tcp_proxy.py | 10 +++++----- .../gcp_compute_target_tcp_proxy_info.py | 2 +- .../modules/gcp_compute_target_vpn_gateway.py | 6 +++--- .../gcp_compute_target_vpn_gateway_info.py | 2 +- plugins/modules/gcp_compute_url_map.py | 6 +++--- plugins/modules/gcp_compute_url_map_info.py | 2 +- plugins/modules/gcp_compute_vpn_tunnel.py | 6 +++--- plugins/modules/gcp_compute_vpn_tunnel_info.py | 2 +- plugins/modules/gcp_dns_managed_zone.py | 4 ++-- plugins/modules/gcp_dns_managed_zone_info.py | 2 +- plugins/modules/gcp_dns_resource_record_set.py | 4 ++-- .../gcp_dns_resource_record_set_info.py | 2 +- plugins/modules/gcp_storage_bucket.py | 4 ++-- .../gcp_storage_bucket_access_control.py | 4 ++-- .../modules/gcp_storage_default_object_acl.py | 4 ++-- 107 files changed, 282 insertions(+), 276 deletions(-) diff --git a/plugins/modules/gcp_bigquery_dataset.py b/plugins/modules/gcp_bigquery_dataset.py index 5d20042d1..206895aa8 100644 --- a/plugins/modules/gcp_bigquery_dataset.py +++ b/plugins/modules/gcp_bigquery_dataset.py @@ -598,11 +598,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/bigquery/v2/projects/{project}/datasets/{name}".format(**module.params) + return "https://bigquery.googleapis.com/bigquery/v2/projects/{project}/datasets/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/bigquery/v2/projects/{project}/datasets".format(**module.params) + return "https://bigquery.googleapis.com/bigquery/v2/projects/{project}/datasets".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): diff --git a/plugins/modules/gcp_bigquery_dataset_info.py b/plugins/modules/gcp_bigquery_dataset_info.py index 0590b0724..2b31f3b19 100644 --- a/plugins/modules/gcp_bigquery_dataset_info.py +++ b/plugins/modules/gcp_bigquery_dataset_info.py @@ -317,7 +317,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/bigquery/v2/projects/{project}/datasets".format(**module.params) + return "https://bigquery.googleapis.com/bigquery/v2/projects/{project}/datasets".format(**module.params) def fetch_list(module, link): diff --git a/plugins/modules/gcp_bigquery_table.py b/plugins/modules/gcp_bigquery_table.py index 6633719a6..0f9bb18d5 100644 --- a/plugins/modules/gcp_bigquery_table.py +++ b/plugins/modules/gcp_bigquery_table.py @@ -1192,11 +1192,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/bigquery/v2/projects/{project}/datasets/{dataset}/tables/{name}".format(**module.params) + return "https://bigquery.googleapis.com/bigquery/v2/projects/{project}/datasets/{dataset}/tables/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/bigquery/v2/projects/{project}/datasets/{dataset}/tables".format(**module.params) + return "https://bigquery.googleapis.com/bigquery/v2/projects/{project}/datasets/{dataset}/tables".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): diff --git a/plugins/modules/gcp_bigquery_table_info.py b/plugins/modules/gcp_bigquery_table_info.py index 7a5f7b614..7ad1de707 100644 --- a/plugins/modules/gcp_bigquery_table_info.py +++ b/plugins/modules/gcp_bigquery_table_info.py @@ -593,7 +593,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/bigquery/v2/projects/{project}/datasets/{dataset}/tables".format(**module.params) + return "https://bigquery.googleapis.com/bigquery/v2/projects/{project}/datasets/{dataset}/tables".format(**module.params) def fetch_list(module, link): diff --git a/plugins/modules/gcp_compute_address.py b/plugins/modules/gcp_compute_address.py index c9ba654e0..c11b7db15 100644 --- a/plugins/modules/gcp_compute_address.py +++ b/plugins/modules/gcp_compute_address.py @@ -365,11 +365,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/addresses/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/addresses/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/addresses".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/addresses".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -432,7 +432,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_address_info.py b/plugins/modules/gcp_compute_address_info.py index 4b6306060..c5cc01f23 100644 --- a/plugins/modules/gcp_compute_address_info.py +++ b/plugins/modules/gcp_compute_address_info.py @@ -221,7 +221,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/addresses".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/addresses".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_autoscaler.py b/plugins/modules/gcp_compute_autoscaler.py index d3c70a19d..a73a5aa57 100644 --- a/plugins/modules/gcp_compute_autoscaler.py +++ b/plugins/modules/gcp_compute_autoscaler.py @@ -591,11 +591,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/autoscalers/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/autoscalers/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/autoscalers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/autoscalers".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -653,7 +653,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_autoscaler_info.py b/plugins/modules/gcp_compute_autoscaler_info.py index 46e2497c8..acd956ec6 100644 --- a/plugins/modules/gcp_compute_autoscaler_info.py +++ b/plugins/modules/gcp_compute_autoscaler_info.py @@ -281,7 +281,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/autoscalers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/autoscalers".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_backend_bucket.py b/plugins/modules/gcp_compute_backend_bucket.py index 5799facb2..9ede36306 100644 --- a/plugins/modules/gcp_compute_backend_bucket.py +++ b/plugins/modules/gcp_compute_backend_bucket.py @@ -328,11 +328,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/backendBuckets/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/backendBuckets/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/backendBuckets".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/backendBuckets".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -391,7 +391,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_backend_bucket_info.py b/plugins/modules/gcp_compute_backend_bucket_info.py index 6517059fe..a0624dafb 100644 --- a/plugins/modules/gcp_compute_backend_bucket_info.py +++ b/plugins/modules/gcp_compute_backend_bucket_info.py @@ -190,7 +190,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/backendBuckets".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/backendBuckets".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_backend_service.py b/plugins/modules/gcp_compute_backend_service.py index 4d3094802..8325a3bd1 100644 --- a/plugins/modules/gcp_compute_backend_service.py +++ b/plugins/modules/gcp_compute_backend_service.py @@ -1438,7 +1438,7 @@ def update_fields(module, request, response): def security_policy_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/backendServices/{name}/setSecurityPolicy"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/backendServices/{name}/setSecurityPolicy"]).format(**module.params), {u'securityPolicy': module.params.get('security_policy')}, ) @@ -1487,11 +1487,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/backendServices/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/backendServices".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -1567,7 +1567,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_backend_service_info.py b/plugins/modules/gcp_compute_backend_service_info.py index 79e78600b..d220e62c9 100644 --- a/plugins/modules/gcp_compute_backend_service_info.py +++ b/plugins/modules/gcp_compute_backend_service_info.py @@ -700,7 +700,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/backendServices".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_disk.py b/plugins/modules/gcp_compute_disk.py index 292a84ffc..4d81a5f7d 100644 --- a/plugins/modules/gcp_compute_disk.py +++ b/plugins/modules/gcp_compute_disk.py @@ -573,7 +573,7 @@ def update_fields(module, request, response): def label_fingerprint_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/disks/{name}/setLabels"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/disks/{name}/setLabels"]).format(**module.params), {u'labelFingerprint': response.get('labelFingerprint'), u'labels': module.params.get('labels')}, ) @@ -581,7 +581,7 @@ def label_fingerprint_update(module, request, response): def size_gb_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/disks/{name}/resize"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/disks/{name}/resize"]).format(**module.params), {u'sizeGb': module.params.get('size_gb')}, ) @@ -620,11 +620,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -690,16 +690,16 @@ def response_to_hash(module, response): def disk_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_disk_info.py b/plugins/modules/gcp_compute_disk_info.py index 3d0ba9678..f1626f8d4 100644 --- a/plugins/modules/gcp_compute_disk_info.py +++ b/plugins/modules/gcp_compute_disk_info.py @@ -352,7 +352,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_external_vpn_gateway.py b/plugins/modules/gcp_compute_external_vpn_gateway.py index db3e2998e..48471504e 100644 --- a/plugins/modules/gcp_compute_external_vpn_gateway.py +++ b/plugins/modules/gcp_compute_external_vpn_gateway.py @@ -303,11 +303,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/externalVpnGateways/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/externalVpnGateways/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/externalVpnGateways".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/externalVpnGateways".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -363,7 +363,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_external_vpn_gateway_info.py b/plugins/modules/gcp_compute_external_vpn_gateway_info.py index 390733f78..cb4772660 100644 --- a/plugins/modules/gcp_compute_external_vpn_gateway_info.py +++ b/plugins/modules/gcp_compute_external_vpn_gateway_info.py @@ -178,7 +178,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/externalVpnGateways".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/externalVpnGateways".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_firewall.py b/plugins/modules/gcp_compute_firewall.py index 37d5b38b2..6a9b354db 100644 --- a/plugins/modules/gcp_compute_firewall.py +++ b/plugins/modules/gcp_compute_firewall.py @@ -642,11 +642,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/firewalls/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/firewalls/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/firewalls".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/firewalls".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -715,7 +715,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_firewall_info.py b/plugins/modules/gcp_compute_firewall_info.py index c16c63422..afd65fc7d 100644 --- a/plugins/modules/gcp_compute_firewall_info.py +++ b/plugins/modules/gcp_compute_firewall_info.py @@ -325,7 +325,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/firewalls".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/firewalls".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_forwarding_rule.py b/plugins/modules/gcp_compute_forwarding_rule.py index 91d6bb7ee..5b58b16a3 100644 --- a/plugins/modules/gcp_compute_forwarding_rule.py +++ b/plugins/modules/gcp_compute_forwarding_rule.py @@ -557,7 +557,7 @@ def update_fields(module, request, response): def target_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/forwardingRules/{name}/setTarget"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/forwardingRules/{name}/setTarget"]).format(**module.params), {u'target': module.params.get('target')}, ) @@ -565,7 +565,7 @@ def target_update(module, request, response): def allow_global_access_update(module, request, response): auth = GcpSession(module, 'compute') auth.patch( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/forwardingRules/{name}"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/forwardingRules/{name}"]).format(**module.params), {u'allowGlobalAccess': module.params.get('allow_global_access')}, ) @@ -608,11 +608,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/forwardingRules/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/forwardingRules/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/forwardingRules".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/forwardingRules".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -682,7 +682,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_forwarding_rule_info.py b/plugins/modules/gcp_compute_forwarding_rule_info.py index 447d0769a..b7ac59722 100644 --- a/plugins/modules/gcp_compute_forwarding_rule_info.py +++ b/plugins/modules/gcp_compute_forwarding_rule_info.py @@ -308,7 +308,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/forwardingRules".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/forwardingRules".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_global_address.py b/plugins/modules/gcp_compute_global_address.py index 8e1c6449f..31df97c04 100644 --- a/plugins/modules/gcp_compute_global_address.py +++ b/plugins/modules/gcp_compute_global_address.py @@ -347,11 +347,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/addresses/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/addresses/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/addresses".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/addresses".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -414,16 +414,16 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_global_address_info.py b/plugins/modules/gcp_compute_global_address_info.py index bd6df653b..f86436adb 100644 --- a/plugins/modules/gcp_compute_global_address_info.py +++ b/plugins/modules/gcp_compute_global_address_info.py @@ -206,7 +206,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/addresses".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/addresses".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_global_forwarding_rule.py b/plugins/modules/gcp_compute_global_forwarding_rule.py index 4e3854064..7c856d729 100644 --- a/plugins/modules/gcp_compute_global_forwarding_rule.py +++ b/plugins/modules/gcp_compute_global_forwarding_rule.py @@ -562,7 +562,7 @@ def update_fields(module, request, response): def target_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/forwardingRules/{name}/setTarget"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/forwardingRules/{name}/setTarget"]).format(**module.params), {u'target': module.params.get('target')}, ) @@ -600,11 +600,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/forwardingRules/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/forwardingRules/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/forwardingRules".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/forwardingRules".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -668,7 +668,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_global_forwarding_rule_info.py b/plugins/modules/gcp_compute_global_forwarding_rule_info.py index b16a6978a..1a3836f7e 100644 --- a/plugins/modules/gcp_compute_global_forwarding_rule_info.py +++ b/plugins/modules/gcp_compute_global_forwarding_rule_info.py @@ -285,7 +285,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/forwardingRules".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/forwardingRules".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_health_check.py b/plugins/modules/gcp_compute_health_check.py index 094f9079b..b123da869 100644 --- a/plugins/modules/gcp_compute_health_check.py +++ b/plugins/modules/gcp_compute_health_check.py @@ -1053,11 +1053,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/healthChecks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/healthChecks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -1124,7 +1124,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_health_check_info.py b/plugins/modules/gcp_compute_health_check_info.py index 2ab3f278f..bd7697b00 100644 --- a/plugins/modules/gcp_compute_health_check_info.py +++ b/plugins/modules/gcp_compute_health_check_info.py @@ -518,7 +518,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/healthChecks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_http_health_check.py b/plugins/modules/gcp_compute_http_health_check.py index d4c67783a..94f8e8da6 100644 --- a/plugins/modules/gcp_compute_http_health_check.py +++ b/plugins/modules/gcp_compute_http_health_check.py @@ -355,11 +355,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/httpHealthChecks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/httpHealthChecks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/httpHealthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/httpHealthChecks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -422,7 +422,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_http_health_check_info.py b/plugins/modules/gcp_compute_http_health_check_info.py index f3721338f..3320950fb 100644 --- a/plugins/modules/gcp_compute_http_health_check_info.py +++ b/plugins/modules/gcp_compute_http_health_check_info.py @@ -207,7 +207,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/httpHealthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/httpHealthChecks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_https_health_check.py b/plugins/modules/gcp_compute_https_health_check.py index 417924285..ecd6f613b 100644 --- a/plugins/modules/gcp_compute_https_health_check.py +++ b/plugins/modules/gcp_compute_https_health_check.py @@ -352,11 +352,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/httpsHealthChecks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/httpsHealthChecks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/httpsHealthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/httpsHealthChecks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -419,7 +419,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_https_health_check_info.py b/plugins/modules/gcp_compute_https_health_check_info.py index a076ec3d3..a0356dd39 100644 --- a/plugins/modules/gcp_compute_https_health_check_info.py +++ b/plugins/modules/gcp_compute_https_health_check_info.py @@ -207,7 +207,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/httpsHealthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/httpsHealthChecks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_image.py b/plugins/modules/gcp_compute_image.py index b4f910151..b54547031 100644 --- a/plugins/modules/gcp_compute_image.py +++ b/plugins/modules/gcp_compute_image.py @@ -601,7 +601,7 @@ def update_fields(module, request, response): def labels_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/images/{name}/setLabels"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/images/{name}/setLabels"]).format(**module.params), {u'labels': module.params.get('labels'), u'labelFingerprint': response.get('labelFingerprint')}, ) @@ -644,11 +644,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/images/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/images/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/images".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/images".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -720,16 +720,16 @@ def response_to_hash(module, response): def license_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1//projects/.*/global/licenses/.*" + url = r"https://compute.googleapis.com/compute/v1//projects/.*/global/licenses/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1//projects/{project}/global/licenses/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1//projects/{project}/global/licenses/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_image_info.py b/plugins/modules/gcp_compute_image_info.py index 264d2631a..5f8a3c51b 100644 --- a/plugins/modules/gcp_compute_image_info.py +++ b/plugins/modules/gcp_compute_image_info.py @@ -353,7 +353,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/images".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/images".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_instance.py b/plugins/modules/gcp_compute_instance.py index cb9b7f29d..afe46c2cc 100644 --- a/plugins/modules/gcp_compute_instance.py +++ b/plugins/modules/gcp_compute_instance.py @@ -1209,7 +1209,7 @@ def update_fields(module, request, response): def label_fingerprint_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/instances/{name}/setLabels"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/instances/{name}/setLabels"]).format(**module.params), {u'labelFingerprint': response.get('labelFingerprint'), u'labels': module.params.get('labels')}, ) @@ -1217,7 +1217,7 @@ def label_fingerprint_update(module, request, response): def machine_type_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/instances/{name}/setMachineType"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/instances/{name}/setMachineType"]).format(**module.params), {u'machineType': machine_type_selflink(module.params.get('machine_type'), module.params)}, ) @@ -1262,11 +1262,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -1342,25 +1342,25 @@ def response_to_hash(module, response): def disk_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name return name def machine_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/machineTypes/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/zones/.*/machineTypes/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/machineTypes/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/machineTypes/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_instance_group.py b/plugins/modules/gcp_compute_instance_group.py index 347c4d50c..2a057a9c2 100644 --- a/plugins/modules/gcp_compute_instance_group.py +++ b/plugins/modules/gcp_compute_instance_group.py @@ -377,11 +377,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroups".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroups".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -441,16 +441,16 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_instance_group_info.py b/plugins/modules/gcp_compute_instance_group_info.py index 9c78d1b9b..f1d8325ed 100644 --- a/plugins/modules/gcp_compute_instance_group_info.py +++ b/plugins/modules/gcp_compute_instance_group_info.py @@ -216,7 +216,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroups".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroups".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_instance_group_manager.py b/plugins/modules/gcp_compute_instance_group_manager.py index 7c81c25f1..5aacaa8e5 100644 --- a/plugins/modules/gcp_compute_instance_group_manager.py +++ b/plugins/modules/gcp_compute_instance_group_manager.py @@ -475,11 +475,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -543,16 +543,16 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_instance_group_manager_info.py b/plugins/modules/gcp_compute_instance_group_manager_info.py index 000077265..4659c4b24 100644 --- a/plugins/modules/gcp_compute_instance_group_manager_info.py +++ b/plugins/modules/gcp_compute_instance_group_manager_info.py @@ -291,7 +291,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_instance_info.py b/plugins/modules/gcp_compute_instance_info.py index e688680ac..606aa6dfb 100644 --- a/plugins/modules/gcp_compute_instance_info.py +++ b/plugins/modules/gcp_compute_instance_info.py @@ -600,7 +600,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_instance_template.py b/plugins/modules/gcp_compute_instance_template.py index f78d402fc..eb486d889 100644 --- a/plugins/modules/gcp_compute_instance_template.py +++ b/plugins/modules/gcp_compute_instance_template.py @@ -1139,11 +1139,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/instanceTemplates/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/instanceTemplates/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/instanceTemplates".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/instanceTemplates".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -1203,16 +1203,16 @@ def response_to_hash(module, response): def disk_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/zones/.*/diskTypes/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/diskTypes/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_instance_template_info.py b/plugins/modules/gcp_compute_instance_template_info.py index 093e75aeb..5e6e6849e 100644 --- a/plugins/modules/gcp_compute_instance_template_info.py +++ b/plugins/modules/gcp_compute_instance_template_info.py @@ -563,7 +563,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/instanceTemplates".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/instanceTemplates".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_interconnect_attachment.py b/plugins/modules/gcp_compute_interconnect_attachment.py index 8635fc17d..4c7287960 100644 --- a/plugins/modules/gcp_compute_interconnect_attachment.py +++ b/plugins/modules/gcp_compute_interconnect_attachment.py @@ -456,11 +456,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/interconnectAttachments".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/interconnectAttachments".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -531,16 +531,16 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_interconnect_attachment_info.py b/plugins/modules/gcp_compute_interconnect_attachment_info.py index db69f62d4..6c3d387ec 100644 --- a/plugins/modules/gcp_compute_interconnect_attachment_info.py +++ b/plugins/modules/gcp_compute_interconnect_attachment_info.py @@ -287,7 +287,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/interconnectAttachments".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/interconnectAttachments".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_network.py b/plugins/modules/gcp_compute_network.py index 707890f10..86092145a 100644 --- a/plugins/modules/gcp_compute_network.py +++ b/plugins/modules/gcp_compute_network.py @@ -299,7 +299,7 @@ def update_fields(module, request, response): def routing_config_update(module, request, response): auth = GcpSession(module, 'compute') auth.patch( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/networks/{name}"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/networks/{name}"]).format(**module.params), {u'routingConfig': NetworkRoutingconfig(module.params.get('routing_config', {}), module).to_request()}, ) @@ -331,11 +331,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/networks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/networks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/networks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -395,7 +395,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_network_endpoint_group.py b/plugins/modules/gcp_compute_network_endpoint_group.py index 14a7a4831..a59856e3f 100644 --- a/plugins/modules/gcp_compute_network_endpoint_group.py +++ b/plugins/modules/gcp_compute_network_endpoint_group.py @@ -351,11 +351,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -415,7 +415,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_network_endpoint_group_info.py b/plugins/modules/gcp_compute_network_endpoint_group_info.py index 9f2bede12..64fb657af 100644 --- a/plugins/modules/gcp_compute_network_endpoint_group_info.py +++ b/plugins/modules/gcp_compute_network_endpoint_group_info.py @@ -195,7 +195,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_network_info.py b/plugins/modules/gcp_compute_network_info.py index 1957072bf..b58edd6de 100644 --- a/plugins/modules/gcp_compute_network_info.py +++ b/plugins/modules/gcp_compute_network_info.py @@ -199,7 +199,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/networks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/networks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_node_group.py b/plugins/modules/gcp_compute_node_group.py index aba41959e..5c5c0ecec 100644 --- a/plugins/modules/gcp_compute_node_group.py +++ b/plugins/modules/gcp_compute_node_group.py @@ -265,7 +265,7 @@ def update_fields(module, request, response): def node_template_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/nodeGroups/{name}/setNodeTemplate"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/nodeGroups/{name}/setNodeTemplate"]).format(**module.params), {u'nodeTemplate': replace_resource_dict(module.params.get(u'node_template', {}), 'selfLink')}, ) @@ -297,15 +297,15 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups".format(**module.params) def create_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups?initialNodeCount={size}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups?initialNodeCount={size}".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -362,25 +362,25 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name def zone_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/zones/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_node_group_info.py b/plugins/modules/gcp_compute_node_group_info.py index 3fae1da2e..d87516c08 100644 --- a/plugins/modules/gcp_compute_node_group_info.py +++ b/plugins/modules/gcp_compute_node_group_info.py @@ -173,7 +173,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/nodeGroups".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_node_template.py b/plugins/modules/gcp_compute_node_template.py index 755939498..b81a18128 100644 --- a/plugins/modules/gcp_compute_node_template.py +++ b/plugins/modules/gcp_compute_node_template.py @@ -321,11 +321,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/nodeTemplates".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/nodeTemplates".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -383,16 +383,16 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_node_template_info.py b/plugins/modules/gcp_compute_node_template_info.py index b79a00339..43553d9e9 100644 --- a/plugins/modules/gcp_compute_node_template_info.py +++ b/plugins/modules/gcp_compute_node_template_info.py @@ -197,7 +197,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/nodeTemplates".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/nodeTemplates".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_autoscaler.py b/plugins/modules/gcp_compute_region_autoscaler.py index 7a4090201..2017b0ec6 100644 --- a/plugins/modules/gcp_compute_region_autoscaler.py +++ b/plugins/modules/gcp_compute_region_autoscaler.py @@ -563,11 +563,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/autoscalers/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/autoscalers/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/autoscalers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/autoscalers".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -625,7 +625,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_autoscaler_info.py b/plugins/modules/gcp_compute_region_autoscaler_info.py index 46a76613e..5f12368a9 100644 --- a/plugins/modules/gcp_compute_region_autoscaler_info.py +++ b/plugins/modules/gcp_compute_region_autoscaler_info.py @@ -281,7 +281,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/autoscalers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/autoscalers".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_backend_service.py b/plugins/modules/gcp_compute_region_backend_service.py index b8570b4ae..e19bbfb94 100644 --- a/plugins/modules/gcp_compute_region_backend_service.py +++ b/plugins/modules/gcp_compute_region_backend_service.py @@ -1379,11 +1379,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -1456,7 +1456,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_backend_service_info.py b/plugins/modules/gcp_compute_region_backend_service_info.py index d707f522b..63fc7ed0f 100644 --- a/plugins/modules/gcp_compute_region_backend_service_info.py +++ b/plugins/modules/gcp_compute_region_backend_service_info.py @@ -675,7 +675,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_disk.py b/plugins/modules/gcp_compute_region_disk.py index d3db5681e..cc240dcae 100644 --- a/plugins/modules/gcp_compute_region_disk.py +++ b/plugins/modules/gcp_compute_region_disk.py @@ -481,7 +481,7 @@ def update_fields(module, request, response): def label_fingerprint_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/disks/{name}/setLabels"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/disks/{name}/setLabels"]).format(**module.params), {u'labelFingerprint': response.get('labelFingerprint'), u'labels': module.params.get('labels')}, ) @@ -489,7 +489,7 @@ def label_fingerprint_update(module, request, response): def size_gb_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/disks/{name}/resize"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/disks/{name}/resize"]).format(**module.params), {u'sizeGb': module.params.get('size_gb')}, ) @@ -527,11 +527,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -597,25 +597,25 @@ def response_to_hash(module, response): def zone_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/zones/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/zones/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/zones/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/%s".format(**params) % name return name def region_disk_type_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*/diskTypes/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*/diskTypes/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/diskTypes/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/diskTypes/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_disk_info.py b/plugins/modules/gcp_compute_region_disk_info.py index b789d541c..fd45ea7cb 100644 --- a/plugins/modules/gcp_compute_region_disk_info.py +++ b/plugins/modules/gcp_compute_region_disk_info.py @@ -296,7 +296,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_health_check.py b/plugins/modules/gcp_compute_region_health_check.py index ff2af5b82..1dd49bfd0 100644 --- a/plugins/modules/gcp_compute_region_health_check.py +++ b/plugins/modules/gcp_compute_region_health_check.py @@ -1065,11 +1065,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/healthChecks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/healthChecks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/healthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/healthChecks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -1136,16 +1136,16 @@ def response_to_hash(module, response): def region_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1/projects/.*/regions/.*" + url = r"https://compute.googleapis.com/compute/v1/projects/.*/regions/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_health_check_info.py b/plugins/modules/gcp_compute_region_health_check_info.py index f8668d8ff..68ca95576 100644 --- a/plugins/modules/gcp_compute_region_health_check_info.py +++ b/plugins/modules/gcp_compute_region_health_check_info.py @@ -529,7 +529,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/healthChecks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/healthChecks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_instance_group_manager.py b/plugins/modules/gcp_compute_region_instance_group_manager.py index 2afca8af4..ed33f9d98 100644 --- a/plugins/modules/gcp_compute_region_instance_group_manager.py +++ b/plugins/modules/gcp_compute_region_instance_group_manager.py @@ -506,11 +506,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -574,7 +574,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_instance_group_manager_info.py b/plugins/modules/gcp_compute_region_instance_group_manager_info.py index d7380116a..ca4426ffb 100644 --- a/plugins/modules/gcp_compute_region_instance_group_manager_info.py +++ b/plugins/modules/gcp_compute_region_instance_group_manager_info.py @@ -304,7 +304,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/instanceGroupManagers".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_target_http_proxy.py b/plugins/modules/gcp_compute_region_target_http_proxy.py index bd155d401..476e0da30 100644 --- a/plugins/modules/gcp_compute_region_target_http_proxy.py +++ b/plugins/modules/gcp_compute_region_target_http_proxy.py @@ -305,7 +305,9 @@ def update_fields(module, request, response): def url_map_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/targetHttpProxies/{name}/setUrlMap"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/targetHttpProxies/{name}/setUrlMap"]).format( + **module.params + ), {u'urlMap': replace_resource_dict(module.params.get(u'url_map', {}), 'selfLink')}, ) @@ -337,11 +339,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpProxies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpProxies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -398,7 +400,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_target_http_proxy_info.py b/plugins/modules/gcp_compute_region_target_http_proxy_info.py index 6284c631a..67c6ca273 100644 --- a/plugins/modules/gcp_compute_region_target_http_proxy_info.py +++ b/plugins/modules/gcp_compute_region_target_http_proxy_info.py @@ -179,7 +179,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpProxies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_target_https_proxy.py b/plugins/modules/gcp_compute_region_target_https_proxy.py index 837c8d68c..995ae7880 100644 --- a/plugins/modules/gcp_compute_region_target_https_proxy.py +++ b/plugins/modules/gcp_compute_region_target_https_proxy.py @@ -361,7 +361,7 @@ def update_fields(module, request, response): def ssl_certificates_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/targetHttpsProxies/{name}/setSslCertificates"]).format( + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/targetHttpsProxies/{name}/setSslCertificates"]).format( **module.params ), {u'sslCertificates': replace_resource_dict(module.params.get('ssl_certificates', []), 'selfLink')}, @@ -371,7 +371,9 @@ def ssl_certificates_update(module, request, response): def url_map_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/targetHttpsProxies/{name}/setUrlMap"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/targetHttpsProxies/{name}/setUrlMap"]).format( + **module.params + ), {u'urlMap': replace_resource_dict(module.params.get(u'url_map', {}), 'selfLink')}, ) @@ -404,11 +406,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -466,7 +468,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_target_https_proxy_info.py b/plugins/modules/gcp_compute_region_target_https_proxy_info.py index 7f6cbb890..5eaff7f57 100644 --- a/plugins/modules/gcp_compute_region_target_https_proxy_info.py +++ b/plugins/modules/gcp_compute_region_target_https_proxy_info.py @@ -186,7 +186,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetHttpsProxies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_region_url_map.py b/plugins/modules/gcp_compute_region_url_map.py index 0172eec5d..50c3086d6 100644 --- a/plugins/modules/gcp_compute_region_url_map.py +++ b/plugins/modules/gcp_compute_region_url_map.py @@ -3528,11 +3528,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/urlMaps/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/urlMaps/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/urlMaps".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/urlMaps".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -3594,7 +3594,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_region_url_map_info.py b/plugins/modules/gcp_compute_region_url_map_info.py index 6eb3a6b5a..09ab7b0cb 100644 --- a/plugins/modules/gcp_compute_region_url_map_info.py +++ b/plugins/modules/gcp_compute_region_url_map_info.py @@ -1607,7 +1607,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/urlMaps".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/urlMaps".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_reservation.py b/plugins/modules/gcp_compute_reservation.py index 4f95e2815..82076d9cc 100644 --- a/plugins/modules/gcp_compute_reservation.py +++ b/plugins/modules/gcp_compute_reservation.py @@ -445,7 +445,7 @@ def update_fields(module, request, response): def specific_reservation_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/reservations/{name}/resize"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/zones/{zone}/reservations/{name}/resize"]).format(**module.params), {u'specificReservation': ReservationSpecificreservation(module.params.get('specific_reservation', {}), module).to_request()}, ) @@ -477,11 +477,11 @@ def fetch_resource(module, link, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/reservations/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/reservations/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/reservations".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/reservations".format(**module.params) def return_if_object(module, response, allow_not_found=False): @@ -541,7 +541,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_reservation_info.py b/plugins/modules/gcp_compute_reservation_info.py index 33605b322..deb809d02 100644 --- a/plugins/modules/gcp_compute_reservation_info.py +++ b/plugins/modules/gcp_compute_reservation_info.py @@ -261,7 +261,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/reservations".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/reservations".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_resource_policy.py b/plugins/modules/gcp_compute_resource_policy.py index b42ef2133..b9cc5f166 100644 --- a/plugins/modules/gcp_compute_resource_policy.py +++ b/plugins/modules/gcp_compute_resource_policy.py @@ -561,11 +561,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/resourcePolicies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/resourcePolicies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -620,7 +620,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_resource_policy_info.py b/plugins/modules/gcp_compute_resource_policy_info.py index 1f8aae69b..6acd7d737 100644 --- a/plugins/modules/gcp_compute_resource_policy_info.py +++ b/plugins/modules/gcp_compute_resource_policy_info.py @@ -299,7 +299,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/resourcePolicies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/resourcePolicies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_route.py b/plugins/modules/gcp_compute_route.py index 645f5b12f..4e01928fe 100644 --- a/plugins/modules/gcp_compute_route.py +++ b/plugins/modules/gcp_compute_route.py @@ -433,11 +433,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/routes/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/routes/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/routes".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/routes".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -501,7 +501,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_route_info.py b/plugins/modules/gcp_compute_route_info.py index d50340012..143633388 100644 --- a/plugins/modules/gcp_compute_route_info.py +++ b/plugins/modules/gcp_compute_route_info.py @@ -220,7 +220,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/routes".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/routes".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_router.py b/plugins/modules/gcp_compute_router.py index ddc32c9cb..4fd80308b 100644 --- a/plugins/modules/gcp_compute_router.py +++ b/plugins/modules/gcp_compute_router.py @@ -405,11 +405,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -467,7 +467,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_router_info.py b/plugins/modules/gcp_compute_router_info.py index a5bd66bd0..6b5e2f332 100644 --- a/plugins/modules/gcp_compute_router_info.py +++ b/plugins/modules/gcp_compute_router_info.py @@ -225,7 +225,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_snapshot.py b/plugins/modules/gcp_compute_snapshot.py index ba32d735d..a94a4abed 100644 --- a/plugins/modules/gcp_compute_snapshot.py +++ b/plugins/modules/gcp_compute_snapshot.py @@ -398,7 +398,7 @@ def update_fields(module, request, response): def labels_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/snapshots/{name}/setLabels"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/snapshots/{name}/setLabels"]).format(**module.params), {u'labels': module.params.get('labels'), u'labelFingerprint': response.get('labelFingerprint')}, ) @@ -431,16 +431,16 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/snapshots/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/snapshots/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/snapshots".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/snapshots".format(**module.params) def create_link(module): res = {'project': module.params['project'], 'zone': module.params['zone'], 'source_disk': replace_resource_dict(module.params['source_disk'], 'name')} - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{source_disk}/createSnapshot".format(**res) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{source_disk}/createSnapshot".format(**res) def return_if_object(module, response, kind, allow_not_found=False): @@ -501,16 +501,16 @@ def response_to_hash(module, response): def license_selflink(name, params): if name is None: return - url = r"https://www.googleapis.com/compute/v1//projects/.*/global/licenses/.*" + url = r"https://compute.googleapis.com/compute/v1//projects/.*/global/licenses/.*" if not re.match(url, name): - name = "https://www.googleapis.com/compute/v1//projects/{project}/global/licenses/%s".format(**params) % name + name = "https://compute.googleapis.com/compute/v1//projects/{project}/global/licenses/%s".format(**params) % name return name def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/" + url = "https://compute.googleapis.com/compute/v1/" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_snapshot_info.py b/plugins/modules/gcp_compute_snapshot_info.py index 2132ca291..3c6fe0c02 100644 --- a/plugins/modules/gcp_compute_snapshot_info.py +++ b/plugins/modules/gcp_compute_snapshot_info.py @@ -244,7 +244,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/snapshots".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/snapshots".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_ssl_certificate.py b/plugins/modules/gcp_compute_ssl_certificate.py index 376b369de..dd87d0a33 100644 --- a/plugins/modules/gcp_compute_ssl_certificate.py +++ b/plugins/modules/gcp_compute_ssl_certificate.py @@ -299,11 +299,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/sslCertificates/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/sslCertificates/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/sslCertificates".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/sslCertificates".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -361,7 +361,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_ssl_certificate_info.py b/plugins/modules/gcp_compute_ssl_certificate_info.py index 4b4894711..748f67142 100644 --- a/plugins/modules/gcp_compute_ssl_certificate_info.py +++ b/plugins/modules/gcp_compute_ssl_certificate_info.py @@ -174,7 +174,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/sslCertificates".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/sslCertificates".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_ssl_policy.py b/plugins/modules/gcp_compute_ssl_policy.py index 3d1ac559c..7004e1921 100644 --- a/plugins/modules/gcp_compute_ssl_policy.py +++ b/plugins/modules/gcp_compute_ssl_policy.py @@ -333,11 +333,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/sslPolicies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/sslPolicies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/sslPolicies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/sslPolicies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -399,7 +399,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_ssl_policy_info.py b/plugins/modules/gcp_compute_ssl_policy_info.py index 67902ab9a..9104dac70 100644 --- a/plugins/modules/gcp_compute_ssl_policy_info.py +++ b/plugins/modules/gcp_compute_ssl_policy_info.py @@ -210,7 +210,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/sslPolicies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/sslPolicies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_subnetwork.py b/plugins/modules/gcp_compute_subnetwork.py index b1c4d9c29..3bea32e8f 100644 --- a/plugins/modules/gcp_compute_subnetwork.py +++ b/plugins/modules/gcp_compute_subnetwork.py @@ -384,7 +384,9 @@ def update_fields(module, request, response): def ip_cidr_range_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}/expandIpCidrRange"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}/expandIpCidrRange"]).format( + **module.params + ), {u'ipCidrRange': module.params.get('ip_cidr_range')}, ) @@ -392,7 +394,7 @@ def ip_cidr_range_update(module, request, response): def secondary_ip_ranges_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), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}"]).format(**module.params), {u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(module.params.get('secondary_ip_ranges', []), module).to_request()}, ) @@ -400,7 +402,7 @@ def secondary_ip_ranges_update(module, request, response): def private_ip_google_access_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}/setPrivateIpGoogleAccess"]).format( + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}/setPrivateIpGoogleAccess"]).format( **module.params ), {u'privateIpGoogleAccess': module.params.get('private_ip_google_access')}, @@ -437,11 +439,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -503,7 +505,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_subnetwork_info.py b/plugins/modules/gcp_compute_subnetwork_info.py index 44f7ae2b3..b0f5df56f 100644 --- a/plugins/modules/gcp_compute_subnetwork_info.py +++ b/plugins/modules/gcp_compute_subnetwork_info.py @@ -224,7 +224,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_target_http_proxy.py b/plugins/modules/gcp_compute_target_http_proxy.py index c05d8d97d..71aac21f9 100644 --- a/plugins/modules/gcp_compute_target_http_proxy.py +++ b/plugins/modules/gcp_compute_target_http_proxy.py @@ -292,7 +292,7 @@ def update_fields(module, request, response): def url_map_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/targetHttpProxies/{name}/setUrlMap"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/targetHttpProxies/{name}/setUrlMap"]).format(**module.params), {u'urlMap': replace_resource_dict(module.params.get(u'url_map', {}), 'selfLink')}, ) @@ -323,11 +323,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetHttpProxies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetHttpProxies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetHttpProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetHttpProxies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -384,7 +384,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_target_http_proxy_info.py b/plugins/modules/gcp_compute_target_http_proxy_info.py index eba12eab9..aa767cb6b 100644 --- a/plugins/modules/gcp_compute_target_http_proxy_info.py +++ b/plugins/modules/gcp_compute_target_http_proxy_info.py @@ -168,7 +168,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetHttpProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetHttpProxies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_target_https_proxy.py b/plugins/modules/gcp_compute_target_https_proxy.py index 2bca830d2..d45531c99 100644 --- a/plugins/modules/gcp_compute_target_https_proxy.py +++ b/plugins/modules/gcp_compute_target_https_proxy.py @@ -386,7 +386,7 @@ def update_fields(module, request, response): def quic_override_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetHttpsProxies/{name}/setQuicOverride"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetHttpsProxies/{name}/setQuicOverride"]).format(**module.params), {u'quicOverride': module.params.get('quic_override')}, ) @@ -394,7 +394,7 @@ def quic_override_update(module, request, response): def ssl_certificates_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/targetHttpsProxies/{name}/setSslCertificates"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/targetHttpsProxies/{name}/setSslCertificates"]).format(**module.params), {u'sslCertificates': replace_resource_dict(module.params.get('ssl_certificates', []), 'selfLink')}, ) @@ -402,7 +402,7 @@ def ssl_certificates_update(module, request, response): def ssl_policy_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetHttpsProxies/{name}/setSslPolicy"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetHttpsProxies/{name}/setSslPolicy"]).format(**module.params), {u'sslPolicy': replace_resource_dict(module.params.get(u'ssl_policy', {}), 'selfLink')}, ) @@ -410,7 +410,7 @@ def ssl_policy_update(module, request, response): def url_map_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/targetHttpsProxies/{name}/setUrlMap"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/targetHttpsProxies/{name}/setUrlMap"]).format(**module.params), {u'urlMap': replace_resource_dict(module.params.get(u'url_map', {}), 'selfLink')}, ) @@ -444,11 +444,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetHttpsProxies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetHttpsProxies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetHttpsProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetHttpsProxies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -508,7 +508,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_target_https_proxy_info.py b/plugins/modules/gcp_compute_target_https_proxy_info.py index 696983d9f..fb0160567 100644 --- a/plugins/modules/gcp_compute_target_https_proxy_info.py +++ b/plugins/modules/gcp_compute_target_https_proxy_info.py @@ -190,7 +190,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetHttpsProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetHttpsProxies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_target_instance.py b/plugins/modules/gcp_compute_target_instance.py index 09b05316b..30de4a27c 100644 --- a/plugins/modules/gcp_compute_target_instance.py +++ b/plugins/modules/gcp_compute_target_instance.py @@ -322,11 +322,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/targetInstances/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/targetInstances/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/targetInstances".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/targetInstances".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -383,7 +383,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_target_instance_info.py b/plugins/modules/gcp_compute_target_instance_info.py index 2dae94e7c..2d0fba72e 100644 --- a/plugins/modules/gcp_compute_target_instance_info.py +++ b/plugins/modules/gcp_compute_target_instance_info.py @@ -181,7 +181,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/targetInstances".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/targetInstances".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_target_pool.py b/plugins/modules/gcp_compute_target_pool.py index e3eb9aa5a..06dadcd4b 100644 --- a/plugins/modules/gcp_compute_target_pool.py +++ b/plugins/modules/gcp_compute_target_pool.py @@ -386,11 +386,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetPools/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetPools/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetPools".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetPools".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -454,7 +454,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_target_pool_info.py b/plugins/modules/gcp_compute_target_pool_info.py index 59848ff22..c19532acc 100644 --- a/plugins/modules/gcp_compute_target_pool_info.py +++ b/plugins/modules/gcp_compute_target_pool_info.py @@ -227,7 +227,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetPools".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetPools".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_target_ssl_proxy.py b/plugins/modules/gcp_compute_target_ssl_proxy.py index 75f67f273..8894c1e78 100644 --- a/plugins/modules/gcp_compute_target_ssl_proxy.py +++ b/plugins/modules/gcp_compute_target_ssl_proxy.py @@ -374,7 +374,7 @@ def update_fields(module, request, response): def proxy_header_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setProxyHeader"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setProxyHeader"]).format(**module.params), {u'proxyHeader': module.params.get('proxy_header')}, ) @@ -382,7 +382,7 @@ def proxy_header_update(module, request, response): def service_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setBackendService"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setBackendService"]).format(**module.params), {u'service': replace_resource_dict(module.params.get(u'service', {}), 'selfLink')}, ) @@ -390,7 +390,7 @@ def service_update(module, request, response): def ssl_certificates_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setSslCertificates"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setSslCertificates"]).format(**module.params), {u'sslCertificates': replace_resource_dict(module.params.get('ssl_certificates', []), 'selfLink')}, ) @@ -398,7 +398,7 @@ def ssl_certificates_update(module, request, response): def ssl_policy_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setSslPolicy"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetSslProxies/{name}/setSslPolicy"]).format(**module.params), {u'sslPolicy': replace_resource_dict(module.params.get(u'ssl_policy', {}), 'selfLink')}, ) @@ -432,11 +432,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetSslProxies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetSslProxies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetSslProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetSslProxies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -496,7 +496,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_target_ssl_proxy_info.py b/plugins/modules/gcp_compute_target_ssl_proxy_info.py index 166b33389..29386a5bc 100644 --- a/plugins/modules/gcp_compute_target_ssl_proxy_info.py +++ b/plugins/modules/gcp_compute_target_ssl_proxy_info.py @@ -186,7 +186,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetSslProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetSslProxies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_target_tcp_proxy.py b/plugins/modules/gcp_compute_target_tcp_proxy.py index 61a9f1b43..4e69308cf 100644 --- a/plugins/modules/gcp_compute_target_tcp_proxy.py +++ b/plugins/modules/gcp_compute_target_tcp_proxy.py @@ -300,7 +300,7 @@ def update_fields(module, request, response): def proxy_header_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetTcpProxies/{name}/setProxyHeader"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetTcpProxies/{name}/setProxyHeader"]).format(**module.params), {u'proxyHeader': module.params.get('proxy_header')}, ) @@ -308,7 +308,7 @@ def proxy_header_update(module, request, response): def service_update(module, request, response): auth = GcpSession(module, 'compute') auth.post( - ''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/global/targetTcpProxies/{name}/setBackendService"]).format(**module.params), + ''.join(["https://compute.googleapis.com/compute/v1/", "projects/{project}/global/targetTcpProxies/{name}/setBackendService"]).format(**module.params), {u'service': replace_resource_dict(module.params.get(u'service', {}), 'selfLink')}, ) @@ -340,11 +340,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetTcpProxies/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetTcpProxies/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetTcpProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetTcpProxies".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -402,7 +402,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_target_tcp_proxy_info.py b/plugins/modules/gcp_compute_target_tcp_proxy_info.py index 8ca22484a..68b352c25 100644 --- a/plugins/modules/gcp_compute_target_tcp_proxy_info.py +++ b/plugins/modules/gcp_compute_target_tcp_proxy_info.py @@ -172,7 +172,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/targetTcpProxies".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/targetTcpProxies".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_target_vpn_gateway.py b/plugins/modules/gcp_compute_target_vpn_gateway.py index bfacdefac..a176ef02f 100644 --- a/plugins/modules/gcp_compute_target_vpn_gateway.py +++ b/plugins/modules/gcp_compute_target_vpn_gateway.py @@ -303,11 +303,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetVpnGateways".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetVpnGateways".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -366,7 +366,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_target_vpn_gateway_info.py b/plugins/modules/gcp_compute_target_vpn_gateway_info.py index 567bfddbc..1d56ffdfa 100644 --- a/plugins/modules/gcp_compute_target_vpn_gateway_info.py +++ b/plugins/modules/gcp_compute_target_vpn_gateway_info.py @@ -189,7 +189,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetVpnGateways".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/targetVpnGateways".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_url_map.py b/plugins/modules/gcp_compute_url_map.py index 3f854c458..a597e3dd5 100644 --- a/plugins/modules/gcp_compute_url_map.py +++ b/plugins/modules/gcp_compute_url_map.py @@ -5549,11 +5549,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/urlMaps/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/urlMaps/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/urlMaps".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/urlMaps".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -5617,7 +5617,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/global/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_url_map_info.py b/plugins/modules/gcp_compute_url_map_info.py index e1b5eb4b4..69df04d1f 100644 --- a/plugins/modules/gcp_compute_url_map_info.py +++ b/plugins/modules/gcp_compute_url_map_info.py @@ -2489,7 +2489,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/global/urlMaps".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/global/urlMaps".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_compute_vpn_tunnel.py b/plugins/modules/gcp_compute_vpn_tunnel.py index afb318d2f..271c5608b 100644 --- a/plugins/modules/gcp_compute_vpn_tunnel.py +++ b/plugins/modules/gcp_compute_vpn_tunnel.py @@ -414,11 +414,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{name}".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/vpnTunnels".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/vpnTunnels".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): @@ -482,7 +482,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" + url = "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_compute_vpn_tunnel_info.py b/plugins/modules/gcp_compute_vpn_tunnel_info.py index e67597503..ce9f223d5 100644 --- a/plugins/modules/gcp_compute_vpn_tunnel_info.py +++ b/plugins/modules/gcp_compute_vpn_tunnel_info.py @@ -222,7 +222,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/vpnTunnels".format(**module.params) + return "https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/vpnTunnels".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_dns_managed_zone.py b/plugins/modules/gcp_dns_managed_zone.py index f39be1583..f12da7e97 100644 --- a/plugins/modules/gcp_dns_managed_zone.py +++ b/plugins/modules/gcp_dns_managed_zone.py @@ -606,11 +606,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{name}".format(**module.params) + return "https://dns.googleapis.com/dns/v1/projects/{project}/managedZones/{name}".format(**module.params) def collection(module): - return "https://www.googleapis.com/dns/v1/projects/{project}/managedZones".format(**module.params) + return "https://dns.googleapis.com/dns/v1/projects/{project}/managedZones".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): diff --git a/plugins/modules/gcp_dns_managed_zone_info.py b/plugins/modules/gcp_dns_managed_zone_info.py index 675b4ac50..401094b8a 100644 --- a/plugins/modules/gcp_dns_managed_zone_info.py +++ b/plugins/modules/gcp_dns_managed_zone_info.py @@ -311,7 +311,7 @@ def main(): def collection(module): - return "https://www.googleapis.com/dns/v1/projects/{project}/managedZones".format(**module.params) + return "https://dns.googleapis.com/dns/v1/projects/{project}/managedZones".format(**module.params) def fetch_list(module, link, query): diff --git a/plugins/modules/gcp_dns_resource_record_set.py b/plugins/modules/gcp_dns_resource_record_set.py index 956d6f318..5718efc3c 100644 --- a/plugins/modules/gcp_dns_resource_record_set.py +++ b/plugins/modules/gcp_dns_resource_record_set.py @@ -309,12 +309,12 @@ def self_link(module): 'name': module.params['name'], 'type': module.params['type'], } - return "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managed_zone}/rrsets?name={name}&type={type}".format(**res) + return "https://dns.googleapis.com/dns/v1/projects/{project}/managedZones/{managed_zone}/rrsets?name={name}&type={type}".format(**res) def collection(module): res = {'project': module.params['project'], 'managed_zone': replace_resource_dict(module.params['managed_zone'], 'name')} - return "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managed_zone}/changes".format(**res) + return "https://dns.googleapis.com/dns/v1/projects/{project}/managedZones/{managed_zone}/changes".format(**res) def return_if_object(module, response, kind, allow_not_found=False): diff --git a/plugins/modules/gcp_dns_resource_record_set_info.py b/plugins/modules/gcp_dns_resource_record_set_info.py index daabb869e..45f367544 100644 --- a/plugins/modules/gcp_dns_resource_record_set_info.py +++ b/plugins/modules/gcp_dns_resource_record_set_info.py @@ -164,7 +164,7 @@ def main(): def collection(module): res = {'project': module.params['project'], 'managed_zone': replace_resource_dict(module.params['managed_zone'], 'name')} - return "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managed_zone}/rrsets".format(**res) + return "https://dns.googleapis.com/dns/v1/projects/{project}/managedZones/{managed_zone}/rrsets".format(**res) def fetch_list(module, link): diff --git a/plugins/modules/gcp_storage_bucket.py b/plugins/modules/gcp_storage_bucket.py index 442a30dd1..313bf228a 100644 --- a/plugins/modules/gcp_storage_bucket.py +++ b/plugins/modules/gcp_storage_bucket.py @@ -977,11 +977,11 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): - return "https://www.googleapis.com/storage/v1/b/{name}?projection=full".format(**module.params) + return "https://storage.googleapis.com/storage/v1/b/{name}?projection=full".format(**module.params) def collection(module): - return "https://www.googleapis.com/storage/v1/b?project={project}".format(**module.params) + return "https://storage.googleapis.com/storage/v1/b?project={project}".format(**module.params) def return_if_object(module, response, kind, allow_not_found=False): diff --git a/plugins/modules/gcp_storage_bucket_access_control.py b/plugins/modules/gcp_storage_bucket_access_control.py index 94a270bf7..b3ea9bf7b 100644 --- a/plugins/modules/gcp_storage_bucket_access_control.py +++ b/plugins/modules/gcp_storage_bucket_access_control.py @@ -314,12 +314,12 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): res = {'bucket': replace_resource_dict(module.params['bucket'], 'name'), 'entity': module.params['entity']} - return "https://www.googleapis.com/storage/v1/b/{bucket}/acl/{entity}".format(**res) + return "https://storage.googleapis.com/storage/v1/b/{bucket}/acl/{entity}".format(**res) def collection(module): res = {'bucket': replace_resource_dict(module.params['bucket'], 'name')} - return "https://www.googleapis.com/storage/v1/b/{bucket}/acl".format(**res) + return "https://storage.googleapis.com/storage/v1/b/{bucket}/acl".format(**res) def return_if_object(module, response, kind, allow_not_found=False): diff --git a/plugins/modules/gcp_storage_default_object_acl.py b/plugins/modules/gcp_storage_default_object_acl.py index e23f4b45a..e031654ee 100644 --- a/plugins/modules/gcp_storage_default_object_acl.py +++ b/plugins/modules/gcp_storage_default_object_acl.py @@ -330,12 +330,12 @@ def fetch_resource(module, link, kind, allow_not_found=True): def self_link(module): res = {'bucket': replace_resource_dict(module.params['bucket'], 'name'), 'entity': module.params['entity']} - return "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl/{entity}".format(**res) + return "https://storage.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl/{entity}".format(**res) def collection(module): res = {'bucket': replace_resource_dict(module.params['bucket'], 'name')} - return "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl".format(**res) + return "https://storage.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl".format(**res) def return_if_object(module, response, kind, allow_not_found=False): From 3dec692757f12ee21951da541c95d42b284e6181 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 21 Aug 2020 11:12:49 -0700 Subject: [PATCH 09/11] Removed instances where input and output are both true (#3890) (#280) * [provider-yaml] - Removed instances where input and output are both true * modified to only supply output. Following pattern from bigquerydatatransfer Co-authored-by: Scott Suarez Signed-off-by: Modular Magician Co-authored-by: Scott Suarez --- plugins/modules/gcp_redis_instance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/gcp_redis_instance.py b/plugins/modules/gcp_redis_instance.py index b496578e2..a0ad0aa1a 100644 --- a/plugins/modules/gcp_redis_instance.py +++ b/plugins/modules/gcp_redis_instance.py @@ -513,7 +513,7 @@ def response_to_hash(module, response): u'authorizedNetwork': module.params.get('authorized_network'), u'connectMode': module.params.get('connect_mode'), u'createTime': response.get(u'createTime'), - u'currentLocationId': module.params.get('current_location_id'), + u'currentLocationId': response.get(u'currentLocationId'), u'displayName': response.get(u'displayName'), u'host': response.get(u'host'), u'labels': response.get(u'labels'), From f9979997468f45fe75df9a18bc31d25b17266354 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 21 Aug 2020 15:52:47 -0700 Subject: [PATCH 10/11] retrypolicy attribute added (#3843) (#281) * retrypolicy attribute added * test case updated Signed-off-by: Modular Magician --- plugins/modules/gcp_pubsub_subscription.py | 71 +++++++++++++++++++ .../modules/gcp_pubsub_subscription_info.py | 26 +++++++ 2 files changed, 97 insertions(+) diff --git a/plugins/modules/gcp_pubsub_subscription.py b/plugins/modules/gcp_pubsub_subscription.py index 373f4e769..c9763c180 100644 --- a/plugins/modules/gcp_pubsub_subscription.py +++ b/plugins/modules/gcp_pubsub_subscription.py @@ -227,6 +227,32 @@ - If this parameter is 0, a default value of 5 is used. required: false type: int + retry_policy: + description: + - A policy that specifies how Pub/Sub retries message delivery for this subscription. + - If not set, the default retry policy is applied. This generally implies that + messages will be retried as soon as possible for healthy subscribers. RetryPolicy + will be triggered on NACKs or acknowledgement deadline exceeded events for a + given message . + required: false + type: dict + suboptions: + minimum_backoff: + description: + - The minimum delay between consecutive deliveries of a given message. Value + should be between 0 and 600 seconds. Defaults to 10 seconds. + - 'A duration in seconds with up to nine fractional digits, terminated by + ''s''. Example: "3.5s".' + required: false + type: str + maximum_backoff: + description: + - 'The maximum delay between consecutive deliveries of a given message. Value + should be between 0 and 600 seconds. Defaults to 600 seconds. A duration + in seconds with up to nine fractional digits, terminated by ''s''. Example: + "3.5s".' + required: false + type: str enable_message_ordering: description: - If `true`, messages published with the same orderingKey in PubsubMessage will @@ -481,6 +507,31 @@ - If this parameter is 0, a default value of 5 is used. returned: success type: int +retryPolicy: + description: + - A policy that specifies how Pub/Sub retries message delivery for this subscription. + - If not set, the default retry policy is applied. This generally implies that messages + will be retried as soon as possible for healthy subscribers. RetryPolicy will + be triggered on NACKs or acknowledgement deadline exceeded events for a given + message . + returned: success + type: complex + contains: + minimumBackoff: + description: + - The minimum delay between consecutive deliveries of a given message. Value + should be between 0 and 600 seconds. Defaults to 10 seconds. + - 'A duration in seconds with up to nine fractional digits, terminated by ''s''. + Example: "3.5s".' + returned: success + type: str + maximumBackoff: + description: + - 'The maximum delay between consecutive deliveries of a given message. Value + should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in + seconds with up to nine fractional digits, terminated by ''s''. Example: "3.5s".' + returned: success + type: str enableMessageOrdering: description: - If `true`, messages published with the same orderingKey in PubsubMessage will @@ -533,6 +584,7 @@ def main(): expiration_policy=dict(type='dict', options=dict(ttl=dict(required=True, type='str'))), filter=dict(type='str'), dead_letter_policy=dict(type='dict', options=dict(dead_letter_topic=dict(type='str'), max_delivery_attempts=dict(type='int'))), + retry_policy=dict(type='dict', options=dict(minimum_backoff=dict(type='str'), maximum_backoff=dict(type='str'))), enable_message_ordering=dict(type='bool'), ) ) @@ -596,6 +648,8 @@ def updateMask(request, response): update_mask.append('expirationPolicy') if request.get('deadLetterPolicy') != response.get('deadLetterPolicy'): update_mask.append('deadLetterPolicy') + if request.get('retryPolicy') != response.get('retryPolicy'): + update_mask.append('retryPolicy') if request.get('enableMessageOrdering') != response.get('enableMessageOrdering'): update_mask.append('enableMessageOrdering') return ','.join(update_mask) @@ -618,6 +672,7 @@ def resource_to_request(module): u'expirationPolicy': SubscriptionExpirationpolicy(module.params.get('expiration_policy', {}), module).to_request(), u'filter': module.params.get('filter'), u'deadLetterPolicy': SubscriptionDeadletterpolicy(module.params.get('dead_letter_policy', {}), module).to_request(), + u'retryPolicy': SubscriptionRetrypolicy(module.params.get('retry_policy', {}), module).to_request(), u'enableMessageOrdering': module.params.get('enable_message_ordering'), } return_vals = {} @@ -694,6 +749,7 @@ def response_to_hash(module, response): u'expirationPolicy': SubscriptionExpirationpolicy(response.get(u'expirationPolicy', {}), module).from_response(), u'filter': module.params.get('filter'), u'deadLetterPolicy': SubscriptionDeadletterpolicy(response.get(u'deadLetterPolicy', {}), module).from_response(), + u'retryPolicy': SubscriptionRetrypolicy(response.get(u'retryPolicy', {}), module).from_response(), u'enableMessageOrdering': response.get(u'enableMessageOrdering'), } @@ -802,5 +858,20 @@ def from_response(self): ) +class SubscriptionRetrypolicy(object): + def __init__(self, request, module): + self.module = module + if request: + self.request = request + else: + self.request = {} + + def to_request(self): + return remove_nones_from_dict({u'minimumBackoff': self.request.get('minimum_backoff'), u'maximumBackoff': self.request.get('maximum_backoff')}) + + def from_response(self): + return remove_nones_from_dict({u'minimumBackoff': self.request.get(u'minimumBackoff'), u'maximumBackoff': self.request.get(u'maximumBackoff')}) + + if __name__ == '__main__': main() diff --git a/plugins/modules/gcp_pubsub_subscription_info.py b/plugins/modules/gcp_pubsub_subscription_info.py index 457e61bee..1c162da0b 100644 --- a/plugins/modules/gcp_pubsub_subscription_info.py +++ b/plugins/modules/gcp_pubsub_subscription_info.py @@ -279,6 +279,32 @@ - If this parameter is 0, a default value of 5 is used. returned: success type: int + retryPolicy: + description: + - A policy that specifies how Pub/Sub retries message delivery for this subscription. + - If not set, the default retry policy is applied. This generally implies that + messages will be retried as soon as possible for healthy subscribers. RetryPolicy + will be triggered on NACKs or acknowledgement deadline exceeded events for + a given message . + returned: success + type: complex + contains: + minimumBackoff: + description: + - The minimum delay between consecutive deliveries of a given message. Value + should be between 0 and 600 seconds. Defaults to 10 seconds. + - 'A duration in seconds with up to nine fractional digits, terminated by + ''s''. Example: "3.5s".' + returned: success + type: str + maximumBackoff: + description: + - 'The maximum delay between consecutive deliveries of a given message. + Value should be between 0 and 600 seconds. Defaults to 600 seconds. A + duration in seconds with up to nine fractional digits, terminated by ''s''. + Example: "3.5s".' + returned: success + type: str enableMessageOrdering: description: - If `true`, messages published with the same orderingKey in PubsubMessage will From 2bea5e78cd751376cb49e1e3d512a5c34ed04f86 Mon Sep 17 00:00:00 2001 From: upodroid Date: Mon, 2 Nov 2020 15:13:22 +0000 Subject: [PATCH 11/11] add impersonation + kms filters --- plugins/doc_fragments/gcp.py | 5 ++- plugins/filter/gcp_kms_filters.py | 10 ++--- plugins/filter/gcp_secret_filters.py | 60 ++++++++++++++++++++++++++++ plugins/inventory/gcp_compute.py | 5 ++- plugins/module_utils/gcp_utils.py | 10 ++++- 5 files changed, 79 insertions(+), 11 deletions(-) create mode 100644 plugins/filter/gcp_secret_filters.py diff --git a/plugins/doc_fragments/gcp.py b/plugins/doc_fragments/gcp.py index 5dfeb00e6..76aa00a40 100644 --- a/plugins/doc_fragments/gcp.py +++ b/plugins/doc_fragments/gcp.py @@ -21,7 +21,7 @@ class ModuleDocFragment(object): - The type of credential used. type: str required: true - choices: [ application, machineaccount, serviceaccount ] + choices: [ application, machineaccount, serviceaccount, impersonation ] service_account_contents: description: - The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. @@ -33,7 +33,8 @@ class ModuleDocFragment(object): service_account_email: description: - An optional service account email address if machineaccount is selected - and the user does not wish to use the default email. + and the user does not wish to use the default email. This field must be set + if auth_kind is impersonation. type: str scopes: description: diff --git a/plugins/filter/gcp_kms_filters.py b/plugins/filter/gcp_kms_filters.py index 9be0be0df..4b41d34bb 100644 --- a/plugins/filter/gcp_kms_filters.py +++ b/plugins/filter/gcp_kms_filters.py @@ -3,11 +3,9 @@ # Usage: # vars: -# encrypted_myvar: "{{ var | b64encode | gcp_kms_encrypt(auth_kind='serviceaccount', -# service_account_file='gcp_service_account_file', projects='default', +# encrypted_myvar: "{{ var | b64encode | gcp_kms_encrypt(projects='default', # key_ring='key_ring', crypto_key='crypto_key') }}" -# decrypted_myvar: "{{ encrypted_myvar | gcp_kms_decrypt(auth_kind='serviceaccount', -# service_account_file=gcp_service_account_file, projects='default', +# decrypted_myvar: "{{ encrypted_myvar | gcp_kms_decrypt(projects='default', # key_ring='key_ring', crypto_key='crypto_key') }}" from __future__ import (absolute_import, division, print_function) @@ -36,12 +34,12 @@ def run(self, method, **kwargs): 'projects': kwargs.get('projects', None), 'scopes': kwargs.get('scopes', None), 'locations': kwargs.get('locations', 'global'), - 'auth_kind': kwargs.get('auth_kind', None), + 'auth_kind': kwargs.get('auth_kind', 'application'), 'service_account_file': kwargs.get('service_account_file', None), 'service_account_email': kwargs.get('service_account_email', None), } if not params['scopes']: - params['scopes'] = ['https://www.googleapis.com/auth/cloudkms'] + params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform'] fake_module = GcpMockModule(params) if method == "encrypt": return self.kms_encrypt(fake_module) diff --git a/plugins/filter/gcp_secret_filters.py b/plugins/filter/gcp_secret_filters.py new file mode 100644 index 000000000..80c5c5d50 --- /dev/null +++ b/plugins/filter/gcp_secret_filters.py @@ -0,0 +1,60 @@ +# (c) 2019, Eric Anderson +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Usage: +# vars: +# encrypted_myvar: "{{ var | b64encode | gcp_kms_encrypt(projects='default', +# key_ring='key_ring', crypto_key='crypto_key') }}" +# decrypted_myvar: "{{ encrypted_myvar | gcp_kms_decrypt(projects='default', +# key_ring='key_ring', crypto_key='crypto_key') }}" + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.errors import AnsibleError +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import GcpSession + + +class GcpMockModule(object): + def __init__(self, params): + self.params = params + + def fail_json(self, *args, **kwargs): + raise AnsibleError(kwargs['msg']) + + +class GcpSecretFilter(): + def run(self, method, **kwargs): + params = { + 'secret': kwargs.get('secret', None), + 'versions': kwargs.get('version', 'latest'), + 'projects': kwargs.get('projects', None), + 'scopes': kwargs.get('scopes', None), + 'auth_kind': kwargs.get('auth_kind', 'application'), + 'service_account_file': kwargs.get('service_account_file', None), + 'service_account_email': kwargs.get('service_account_email', None), + } + if not params['scopes']: + params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform'] + fake_module = GcpMockModule(params) + if method == "decode": + return self.secret_decode(fake_module) + + def secret_decode(self, module): + payload = {"ciphertext": module.params['ciphertext']} + + auth = GcpSession(module, 'secretmanager') + url = "https://secretmanager.googleapis.com/v1/projects/{projects}/secrets/{secret}/" \ + "versions/{version}:access".format(**module.params) + response = auth.get(url, body=payload) + return response.json()['payload']['data'] + +def gcp_secret_decode(plaintext, **kwargs): + return GcpKmsFilter().run('decode', plaintext=plaintext, **kwargs) + +class FilterModule(object): + + def filters(self): + return { + 'gcp_secret_decode': gcp_secret_decode, + } diff --git a/plugins/inventory/gcp_compute.py b/plugins/inventory/gcp_compute.py index 65532addb..e83aeadba 100644 --- a/plugins/inventory/gcp_compute.py +++ b/plugins/inventory/gcp_compute.py @@ -52,7 +52,7 @@ description: - The type of credential used. required: True - choices: ['application', 'serviceaccount', 'machineaccount'] + choices: ['application', 'serviceaccount', 'machineaccount', 'impersonation'] env: - name: GCP_AUTH_KIND version_added: "2.8.2" @@ -83,7 +83,8 @@ service_account_email: description: - An optional service account email address if machineaccount is selected - and the user does not wish to use the default email. + and the user does not wish to use the default email. This field must be set + if auth_kind is impersonation. env: - name: GCP_SERVICE_ACCOUNT_EMAIL version_added: "2.8.2" diff --git a/plugins/module_utils/gcp_utils.py b/plugins/module_utils/gcp_utils.py index 643c8ca58..3a9a509a3 100644 --- a/plugins/module_utils/gcp_utils.py +++ b/plugins/module_utils/gcp_utils.py @@ -235,6 +235,14 @@ def _credentials(self): elif cred_type == 'machineaccount': return google.auth.compute_engine.Credentials( self.module.params['service_account_email']) + elif cred_type == 'impersonation' and self.module.params['service_account_email']: + source_credentials, project_id = google.auth.default() + return google.auth.impersonated_credentials.Credentials( + source_credentials=source_credentials, + target_principal=self.module.params['service_account_email'], + target_scopes=self.module.params['scopes'], + lifetime=3600, + ) else: self.module.fail_json(msg="Credential type '%s' not implemented" % cred_type) @@ -270,7 +278,7 @@ def __init__(self, *args, **kwargs): auth_kind=dict( required=True, fallback=(env_fallback, ['GCP_AUTH_KIND']), - choices=['machineaccount', 'serviceaccount', 'application'], + choices=['machineaccount', 'serviceaccount', 'application', 'impersonation'], type='str'), service_account_email=dict( required=False,