summaryrefslogtreecommitdiffstats
path: root/ansible_collections/google/cloud/plugins
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:35 +0000
commit7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch)
treeefb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/google/cloud/plugins
parentReleasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff)
downloadansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz
ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/google/cloud/plugins')
-rw-r--r--ansible_collections/google/cloud/plugins/doc_fragments/gcp.py2
-rw-r--r--ansible_collections/google/cloud/plugins/filter/gcp_kms_filters.py1
-rw-r--r--ansible_collections/google/cloud/plugins/inventory/gcp_compute.py13
-rw-r--r--ansible_collections/google/cloud/plugins/module_utils/gcp_utils.py31
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_address.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_address_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_disk.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_disk_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_image.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_image_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_info.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_network.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_network_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_route.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_route_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_router.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_router_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_container_cluster.py48
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_container_cluster_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_iam_role.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_iam_role_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_key.py19
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_logging_metric.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_logging_metric_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_redis_instance.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_redis_instance_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service.py14
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_spanner_database.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_spanner_database_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sql_database.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sql_database_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sql_instance.py6
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sql_instance_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sql_ssl_cert.py51
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sql_user.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_sql_user_info.py9
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket.py5
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket_access_control.py7
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_storage_default_object_acl.py40
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_storage_object.py12
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_tpu_node.py8
-rw-r--r--ansible_collections/google/cloud/plugins/modules/gcp_tpu_node_info.py9
174 files changed, 1348 insertions, 196 deletions
diff --git a/ansible_collections/google/cloud/plugins/doc_fragments/gcp.py b/ansible_collections/google/cloud/plugins/doc_fragments/gcp.py
index 5dfeb00e6..a2d521240 100644
--- a/ansible_collections/google/cloud/plugins/doc_fragments/gcp.py
+++ b/ansible_collections/google/cloud/plugins/doc_fragments/gcp.py
@@ -47,7 +47,7 @@ options:
type: str
notes:
- for authentication, you can set service_account_file using the
- c(gcp_service_account_file) env variable.
+ c(GCP_SERVICE_ACCOUNT_FILE) env variable.
- for authentication, you can set service_account_contents using the
c(GCP_SERVICE_ACCOUNT_CONTENTS) env variable.
- For authentication, you can set service_account_email using the
diff --git a/ansible_collections/google/cloud/plugins/filter/gcp_kms_filters.py b/ansible_collections/google/cloud/plugins/filter/gcp_kms_filters.py
index 9be0be0df..44ae8d0ac 100644
--- a/ansible_collections/google/cloud/plugins/filter/gcp_kms_filters.py
+++ b/ansible_collections/google/cloud/plugins/filter/gcp_kms_filters.py
@@ -39,6 +39,7 @@ class GcpKmsFilter():
'auth_kind': kwargs.get('auth_kind', None),
'service_account_file': kwargs.get('service_account_file', None),
'service_account_email': kwargs.get('service_account_email', None),
+ 'access_token': kwargs.get('access_token', None),
}
if not params['scopes']:
params['scopes'] = ['https://www.googleapis.com/auth/cloudkms']
diff --git a/ansible_collections/google/cloud/plugins/inventory/gcp_compute.py b/ansible_collections/google/cloud/plugins/inventory/gcp_compute.py
index d380acd96..f4743b292 100644
--- a/ansible_collections/google/cloud/plugins/inventory/gcp_compute.py
+++ b/ansible_collections/google/cloud/plugins/inventory/gcp_compute.py
@@ -39,7 +39,7 @@ DOCUMENTATION = """
description: >
A list of filter value pairs. Available filters are listed here
U(https://cloud.google.com/compute/docs/reference/rest/v1/instances/aggregatedList).
- Each additional filter in the list will act be added as an AND condition
+ Each additional filter in the list will be added as an AND condition
(filter1 and filter2)
type: list
hostnames:
@@ -57,7 +57,7 @@ DOCUMENTATION = """
description:
- The type of credential used.
required: True
- choices: ['application', 'serviceaccount', 'machineaccount']
+ choices: ['application', 'serviceaccount', 'machineaccount', 'accesstoken']
env:
- name: GCP_AUTH_KIND
scopes:
@@ -86,6 +86,11 @@ DOCUMENTATION = """
and the user does not wish to use the default email.
env:
- name: GCP_SERVICE_ACCOUNT_EMAIL
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ env:
+ - name: GCP_ACCESS_TOKEN
vars_prefix:
description: prefix to apply to host variables, does not include facts nor params
default: ''
@@ -232,7 +237,8 @@ class GcpInstance(object):
for order in self.hostname_ordering:
name = None
if order.startswith("labels."):
- name = self.json["labels"].get(order[7:])
+ if "labels" in self.json:
+ name = self.json["labels"].get(order[7:])
elif order == "public_ip":
name = self._get_publicip()
elif order == "private_ip":
@@ -558,6 +564,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
"service_account_file": self.get_option("service_account_file"),
"service_account_contents": self.get_option("service_account_contents"),
"service_account_email": self.get_option("service_account_email"),
+ "access_token": self.get_option("access_token"),
}
self.fake_module = GcpMockModule(params)
diff --git a/ansible_collections/google/cloud/plugins/module_utils/gcp_utils.py b/ansible_collections/google/cloud/plugins/module_utils/gcp_utils.py
index 203000cc6..baf9a6c02 100644
--- a/ansible_collections/google/cloud/plugins/module_utils/gcp_utils.py
+++ b/ansible_collections/google/cloud/plugins/module_utils/gcp_utils.py
@@ -5,7 +5,6 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
-import ast
import os
import json
@@ -18,15 +17,14 @@ except ImportError:
try:
import google.auth
import google.auth.compute_engine
- from google.oauth2 import service_account
+ from google.oauth2 import service_account, credentials as oauth2
from google.auth.transport.requests import AuthorizedSession
HAS_GOOGLE_LIBRARIES = True
except ImportError:
HAS_GOOGLE_LIBRARIES = False
from ansible.module_utils.basic import AnsibleModule, env_fallback
-from ansible.module_utils.six import string_types
-from ansible.module_utils._text import to_text, to_native
+from ansible.module_utils._text import to_text
def navigate_hash(source, path, default=None):
@@ -213,6 +211,11 @@ class GcpSession(object):
msg="Service Account File only works with Service Account-based authentication"
)
+ if self.module.params.get('access_token') is not None and self.module.params['auth_kind'] != 'accesstoken':
+ self.module.fail_json(
+ msg='Supplying access_token requires auth_kind set to accesstoken'
+ )
+
def _credentials(self):
cred_type = self.module.params['auth_kind']
@@ -246,8 +249,17 @@ class GcpSession(object):
return svc_acct_creds.with_scopes(self.module.params['scopes'])
if cred_type == 'machineaccount':
- return google.auth.compute_engine.Credentials(
- self.module.params['service_account_email'])
+ email = self.module.params['service_account_email']
+ email = email if email is not None else "default"
+ return google.auth.compute_engine.Credentials(email)
+
+ if cred_type == 'accesstoken':
+ access_token = self.module.params['access_token']
+ if access_token is None:
+ self.module.fail_json(
+ msg='An access token must be supplied when auth_kind is accesstoken'
+ )
+ return oauth2.Credentials(access_token, scopes=self.module.params['scopes'])
self.module.fail_json(msg="Credential type '%s' not implemented" % cred_type)
@@ -279,7 +291,7 @@ class GcpModule(AnsibleModule):
auth_kind=dict(
required=True,
fallback=(env_fallback, ['GCP_AUTH_KIND']),
- choices=['machineaccount', 'serviceaccount', 'application'],
+ choices=['machineaccount', 'serviceaccount', 'accesstoken', 'application'],
type='str'),
service_account_email=dict(
required=False,
@@ -294,6 +306,11 @@ class GcpModule(AnsibleModule):
fallback=(env_fallback, ['GCP_SERVICE_ACCOUNT_CONTENTS']),
no_log=True,
type='jsonarg'),
+ access_token=dict(
+ required=False,
+ fallback=(env_fallback, ['GCP_ACCESS_TOKEN']),
+ no_log=True,
+ type='str'),
scopes=dict(
required=False,
fallback=(env_fallback, ['GCP_SCOPES']),
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule.py b/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule.py
index 508189fe0..f0dbd61c6 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule.py
@@ -87,6 +87,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -101,6 +102,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -121,6 +126,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -171,7 +178,7 @@ priority:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule_info.py
index 639e16f85..7206b1570 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_appengine_firewall_rule_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -134,7 +141,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset.py b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset.py
index 85ad27681..efc365ae7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset.py
@@ -224,6 +224,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -238,6 +239,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -258,6 +263,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -472,7 +479,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset_info.py
index cc4852147..ca689a638 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_dataset_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -295,7 +302,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py
index d02d220cb..b0021e215 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table.py
@@ -475,6 +475,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -489,6 +490,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -994,7 +999,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table_info.py
index 99b89acb1..a67af9590 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_bigquery_table_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -574,7 +581,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance.py b/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance.py
index b70b00456..e219cb22b 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance.py
@@ -117,6 +117,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -131,6 +132,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -235,7 +240,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance_info.py
index deefad028..6c8f4160f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_bigtable_instance_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -172,7 +179,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger.py
index da506a0f0..b252f86f7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger.py
@@ -727,6 +727,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -741,6 +742,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -761,6 +766,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -1482,7 +1489,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger_info.py
index 78c4990aa..c8a9202d0 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudbuild_trigger_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -798,7 +805,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function.py
index 0b3c38ce1..e09ed7be6 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function.py
@@ -174,6 +174,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -188,6 +189,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -369,7 +374,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function_info.py
index 36fc75308..075fd8634 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudfunctions_cloud_function_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -257,7 +264,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job.py
index 40559ff4c..8a9305354 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job.py
@@ -310,6 +310,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -324,6 +325,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -344,6 +349,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -627,7 +634,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job_info.py
index 4ab155ebb..29ba1236a 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudscheduler_job_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -363,7 +370,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue.py
index b2858599b..f8b98f488 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue.py
@@ -188,6 +188,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -202,6 +203,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -384,7 +389,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue_info.py
index 95f306b40..631b10de3 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_cloudtasks_queue_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -263,7 +270,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_address.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_address.py
index 122db491f..55fd596bb 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_address.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_address.py
@@ -153,6 +153,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -167,6 +168,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -188,6 +193,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_address_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_address_info.py
index bbd8c2c80..247d89272 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_address_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_address_info.py
@@ -65,6 +65,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -79,6 +80,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -97,6 +102,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -219,7 +226,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler.py
index d3acc7846..267116f7f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler.py
@@ -260,6 +260,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -274,6 +275,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -294,6 +299,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler_info.py
index f8df9f4d5..110c10da9 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_autoscaler_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -304,7 +311,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket.py
index 5746a0bab..420b59346 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket.py
@@ -174,6 +174,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -188,6 +189,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -208,6 +213,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -366,7 +373,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket_info.py
index 31d098398..aaf40e327 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_bucket_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -236,7 +243,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service.py
index a637a9e9b..b259848ff 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service.py
@@ -702,6 +702,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -716,6 +717,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -736,6 +741,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -1410,7 +1417,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service_info.py
index 415b28fd5..5e715778a 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_backend_service_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -746,7 +753,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk.py
index 0dd36e2a1..8409cac7b 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk.py
@@ -238,6 +238,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -252,6 +253,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -272,6 +277,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk_info.py
index 1abc5c4ca..8e3646825 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_disk_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -359,7 +366,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway.py
index 48471504e..e2d96b131 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway.py
@@ -104,6 +104,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -118,6 +119,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -137,6 +142,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -212,7 +219,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway_info.py
index cb4772660..6e2e0d0f4 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_external_vpn_gateway_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -159,7 +166,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall.py
index 08f044492..cee64bc75 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall.py
@@ -263,6 +263,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -277,6 +278,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -297,6 +302,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall_info.py
index 6b90c57ea..dfc105ee1 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_firewall_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -306,7 +313,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule.py
index f1c13cc8b..8141605ea 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule.py
@@ -237,6 +237,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -251,6 +252,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -271,6 +276,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule_info.py
index f13135d54..87dcb899d 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_forwarding_rule_info.py
@@ -65,6 +65,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -79,6 +80,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -97,6 +102,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -298,7 +305,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address.py
index d1f02bdff..22815350c 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address.py
@@ -124,6 +124,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -138,6 +139,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -158,6 +163,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address_info.py
index a6cc0b882..34aa1755b 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_address_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -189,7 +196,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule.py
index a9bb647f6..158caab88 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule.py
@@ -217,6 +217,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -231,6 +232,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule_info.py
index 292489cbf..735d622ac 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_global_forwarding_rule_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -273,7 +280,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check.py
index e48b07c64..ca4c6428f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check.py
@@ -472,6 +472,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -486,6 +487,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -506,6 +511,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -916,7 +923,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check_info.py
index 3f323c7f5..b6876f25d 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_health_check_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -511,7 +518,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check.py
index c5da8434f..ee1bae398 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check.py
@@ -125,6 +125,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -139,6 +140,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -159,6 +164,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -255,7 +262,7 @@ unhealthyThreshold:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check_info.py
index 2c77d1282..547fdc9ac 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_http_health_check_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -188,7 +195,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check.py
index 8a60ce15d..cd38bb192 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check.py
@@ -122,6 +122,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -136,6 +137,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -156,6 +161,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -252,7 +259,7 @@ unhealthyThreshold:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check_info.py
index 0ff65140d..58af6d454 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_https_health_check_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -188,7 +195,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_image.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_image.py
index c7080564b..66d897a39 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_image.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_image.py
@@ -229,6 +229,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -243,6 +244,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -263,6 +268,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_image_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_image_info.py
index afd396270..2f1acd14d 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_image_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_image_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -335,7 +342,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance.py
index 703ec4c2f..1d7f56e9f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance.py
@@ -522,6 +522,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -536,6 +537,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group.py
index 419e78845..8f65b4b27 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group.py
@@ -138,6 +138,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -152,6 +153,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_info.py
index 6a3ec0c3b..a8d304569 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -197,7 +204,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager.py
index 6b6c05f16..776503d58 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager.py
@@ -136,6 +136,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -150,6 +151,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager_info.py
index 47ec986bb..16a6e5767 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_group_manager_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -272,7 +279,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_info.py
index 45ff87553..e12b957a3 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_info.py
@@ -68,6 +68,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -82,6 +83,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -100,6 +105,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -601,7 +608,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
navigate_hash,
GcpSession,
GcpModule,
- GcpRequest,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template.py
index 078569263..ce4a8eb46 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template.py
@@ -485,6 +485,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -499,6 +500,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template_info.py
index b08cdfaab..2d337cf1b 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_instance_template_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -544,7 +551,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment.py
index 7a2c8037c..5deac092b 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment.py
@@ -194,6 +194,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -208,6 +209,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment_info.py
index 933bdecb5..20b90bebe 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_interconnect_attachment_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -304,7 +311,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network.py
index acaf59dcc..e093195fa 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network.py
@@ -108,6 +108,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -122,6 +123,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -142,6 +147,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -239,7 +246,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group.py
index 9712c42d9..d6350de28 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group.py
@@ -124,6 +124,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -138,6 +139,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -158,6 +163,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group_info.py
index 8f9d1a8e8..b36afb099 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_endpoint_group_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -176,7 +183,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_info.py
index f2b7c498f..7896facb7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_network_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -186,7 +193,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group.py
index e8bf72577..c42311079 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group.py
@@ -141,6 +141,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -155,6 +156,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -175,6 +180,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group_info.py
index 68f340994..6864c281c 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_group_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -203,7 +210,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template.py
index 5db26eaea..5de307c26 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template.py
@@ -135,6 +135,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -149,6 +150,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -169,6 +174,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -280,7 +287,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template_info.py
index 6859ca83e..5219bc602 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_node_template_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -204,7 +211,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler.py
index 06cadd33f..6d4cca956 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler.py
@@ -237,6 +237,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -251,6 +252,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -271,6 +276,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -539,7 +546,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler_info.py
index f53968e28..64114af2c 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_autoscaler_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -304,7 +311,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service.py
index 0ad1bcc5c..557e92d26 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service.py
@@ -718,6 +718,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -732,6 +733,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -752,6 +757,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service_info.py
index 74bea5cb0..685f48ff0 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_backend_service_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -771,7 +778,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk.py
index 17d128562..673d925ae 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk.py
@@ -176,6 +176,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -190,6 +191,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -210,6 +215,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -398,7 +405,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk_info.py
index 648b4b874..6e70b4dac 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_disk_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -277,7 +284,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check.py
index 745f9a579..fcbad2136 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check.py
@@ -472,6 +472,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -486,6 +487,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -506,6 +511,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -922,7 +929,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check_info.py
index d9d427694..38b4a7caa 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_health_check_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -522,7 +529,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager.py
index c2f77b8d5..267e7f17f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager.py
@@ -154,6 +154,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -168,6 +169,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager_info.py
index b32014973..43816fd24 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_instance_group_manager_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -285,7 +292,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy.py
index ec2709564..c409f586e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy.py
@@ -92,6 +92,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -106,6 +107,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -126,6 +131,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy_info.py
index 3ef0366ad..f53beca57 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_http_proxy_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -160,7 +167,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy.py
index 478563398..91dfd3cca 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy.py
@@ -100,6 +100,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -114,6 +115,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -134,6 +139,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy_info.py
index 0af28904c..fdb9f99ab 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_target_https_proxy_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -167,7 +174,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map.py
index ac46b1ca8..1d8c9c315 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map.py
@@ -1602,6 +1602,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -1616,6 +1617,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map_info.py
index ae5f174ca..3b5cdb71c 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_region_url_map_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -1588,7 +1595,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation.py
index 8c82f8417..c0a9dd029 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation.py
@@ -162,6 +162,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -176,6 +177,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -196,6 +201,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -349,7 +356,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation_info.py
index ee9ae46ba..ba42f85f5 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_reservation_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -242,7 +249,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy.py
index 5a668ce09..756685f79 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy.py
@@ -274,6 +274,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -288,6 +289,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -533,7 +538,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy_info.py
index 1aeb54766..545a3bfef 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_resource_policy_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -330,7 +337,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_route.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_route.py
index 3da7d0fa6..12b8bec29 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_route.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_route.py
@@ -174,6 +174,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -188,6 +189,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -208,6 +213,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_route_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_route_info.py
index 034a3155e..86e9ab490 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_route_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_route_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -201,7 +208,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_router.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_router.py
index 77efcbc40..d64d212f5 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_router.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_router.py
@@ -141,6 +141,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -155,6 +156,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -175,6 +180,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_router_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_router_info.py
index 25e148dfa..d595d1991 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_router_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_router_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -206,7 +213,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot.py
index 7f2a61695..5759fbfa0 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot.py
@@ -157,6 +157,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -171,6 +172,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -191,6 +196,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot_info.py
index e1d98952f..26963f3ce 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_snapshot_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -244,7 +251,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate.py
index 15ddabafc..d2f4680da 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate.py
@@ -89,6 +89,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -103,6 +104,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -123,6 +128,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -208,7 +215,7 @@ privateKey:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate_info.py
index e030ce834..27b4ce260 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_certificate_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -155,7 +162,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy.py
index 57cda0d2f..64a62fda6 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy.py
@@ -99,6 +99,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -113,6 +114,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -133,6 +138,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -240,7 +247,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy_info.py
index a194ebec7..04219c88e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_ssl_policy_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -191,7 +198,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork.py
index 3fc743802..7642dc214 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork.py
@@ -151,6 +151,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -165,6 +166,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -186,6 +191,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork_info.py
index 428e35dc5..5b126f29e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_subnetwork_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -210,7 +217,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy.py
index 647a9c4ff..5e92ee6bb 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy.py
@@ -93,6 +93,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -107,6 +108,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -127,6 +132,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy_info.py
index 42fbfceba..6a78af427 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_http_proxy_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -155,7 +162,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy.py
index fa15ab92a..c6927302e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy.py
@@ -121,6 +121,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -135,6 +136,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -155,6 +160,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy_info.py
index 197237c11..b4186a9ee 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_https_proxy_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -177,7 +184,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance.py
index e3fd58e68..686886dc0 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance.py
@@ -104,6 +104,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -118,6 +119,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -138,6 +143,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance_info.py
index 106f0ce43..791fb0a4b 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_instance_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -162,7 +169,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool.py
index b5643afa5..48118c120 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool.py
@@ -146,6 +146,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -160,6 +161,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -180,6 +185,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool_info.py
index f61965156..54345a1bb 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_pool_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -208,7 +215,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy.py
index 33bf10747..cd95c17fb 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy.py
@@ -111,6 +111,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -125,6 +126,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -145,6 +150,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy_info.py
index b6f17d8a8..e23e84170 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_ssl_proxy_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -167,7 +174,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy.py
index 29793bb89..945cb9cf8 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy.py
@@ -98,6 +98,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -112,6 +113,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -132,6 +137,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy_info.py
index 785f1aed7..65cc7759e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_tcp_proxy_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -159,7 +166,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway.py
index 0c5e73309..e76bd4016 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway.py
@@ -91,6 +91,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -105,6 +106,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -124,6 +129,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway_info.py
index 24644af42..8d9763bb0 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_target_vpn_gateway_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -170,7 +177,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map.py
index ed35cfc07..2856e596a 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map.py
@@ -2547,6 +2547,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -2561,6 +2562,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -2580,6 +2585,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map_info.py
index 0bbc26207..fa5431a11 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_url_map_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -2471,7 +2478,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel.py
index 60705a64c..a59e469ae 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel.py
@@ -178,6 +178,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -192,6 +193,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -213,6 +218,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel_info.py
index e0ee1f9ed..7b3430aae 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_compute_vpn_tunnel_info.py
@@ -64,6 +64,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -78,6 +79,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -96,6 +101,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -231,7 +238,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster.py b/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster.py
index 968dfb3ad..0a5d94934 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster.py
@@ -552,6 +552,11 @@ options:
- Set to /netmask (e.g. /14) to have a range chosen with a specific netmask.
required: false
type: str
+ stack_type:
+ description:
+ - 'The IP stack type of the cluster, possible values: (STACK_TYPE_UNSPECIFIED, IPV4, IPV4_IPV6)'
+ required: false
+ type: str
initial_cluster_version:
description:
- The software version of the master endpoint and kubelets used in the cluster
@@ -628,6 +633,11 @@ options:
required: false
type: dict
suboptions:
+ datapath_provider:
+ description:
+ - The datapath provider selects the implementation of the Kubernetes networking model for service resolution and network policy enforcement.
+ required: false
+ type: str
enable_intra_node_visibility:
description:
- Whether Intra-node visibility is enabled for this cluster. This makes same
@@ -681,6 +691,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -695,6 +706,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -1252,6 +1267,11 @@ ipAllocationPolicy:
- Set to /netmask (e.g. /14) to have a range chosen with a specific netmask.
returned: success
type: str
+ stackType:
+ description:
+ - 'The IP stack type of the cluster, possible values: (STACK_TYPE_UNSPECIFIED, IPV4, IPV4_IPV6)'
+ type: str
+ returned: success
endpoint:
description:
- The IP address of this cluster's master endpoint.
@@ -1474,7 +1494,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
@@ -1559,6 +1578,7 @@ def main():
node_ipv4_cidr_block=dict(type='str'),
services_ipv4_cidr_block=dict(type='str'),
tpu_ipv4_cidr_block=dict(type='str'),
+ stack_type=dict(type='str'),
),
),
initial_cluster_version=dict(type='str'),
@@ -1572,7 +1592,14 @@ def main():
binary_authorization=dict(type='dict', options=dict(enabled=dict(type='bool'))),
release_channel=dict(type='dict', options=dict(channel=dict(type='str'))),
shielded_nodes=dict(type='dict', options=dict(enabled=dict(type='bool'))),
- network_config=dict(type='dict', options=dict(enable_intra_node_visibility=dict(type='bool'), default_snat_status=dict(type='bool'))),
+ network_config=dict(
+ type='dict',
+ options=dict(
+ enable_intra_node_visibility=dict(type='bool'),
+ default_snat_status=dict(type='bool'),
+ datapath_provider=dict(type='str'),
+ ),
+ ),
enable_kubernetes_alpha=dict(type='bool'),
location=dict(required=True, type='str', aliases=['zone']),
kubectl_path=dict(type='str'),
@@ -2248,6 +2275,7 @@ class ClusterIpallocationpolicy(object):
u'nodeIpv4CidrBlock': self.request.get('node_ipv4_cidr_block'),
u'servicesIpv4CidrBlock': self.request.get('services_ipv4_cidr_block'),
u'tpuIpv4CidrBlock': self.request.get('tpu_ipv4_cidr_block'),
+ u'stackType': self.request.get('stack_type'),
}
)
@@ -2421,14 +2449,18 @@ class ClusterNetworkconfig(object):
self.request = {}
def to_request(self):
- return remove_nones_from_dict(
- {u'enableIntraNodeVisibility': self.request.get('enable_intra_node_visibility'), u'defaultSnatStatus': self.request.get('default_snat_status')}
- )
+ return remove_nones_from_dict({
+ u'enableIntraNodeVisibility': self.request.get('enable_intra_node_visibility'),
+ u'defaultSnatStatus': self.request.get('default_snat_status'),
+ u'datapathProvider': self.request.get('datapath_provider'),
+ })
def from_response(self):
- return remove_nones_from_dict(
- {u'enableIntraNodeVisibility': self.request.get(u'enableIntraNodeVisibility'), u'defaultSnatStatus': self.request.get(u'defaultSnatStatus')}
- )
+ return remove_nones_from_dict({
+ u'enableIntraNodeVisibility': self.request.get(u'enableIntraNodeVisibility'),
+ u'defaultSnatStatus': self.request.get(u'defaultSnatStatus'),
+ u'datapathProvider': self.request.get('datapath_provider'),
+ })
if __name__ == '__main__':
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster_info.py
index 77d57793f..0b90433c6 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_container_cluster_info.py
@@ -60,6 +60,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -74,6 +75,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -92,6 +97,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -843,7 +850,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool.py b/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool.py
index 82091a681..174083763 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool.py
@@ -358,6 +358,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -372,6 +373,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool_info.py
index 03c7ccda3..e27412abb 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_container_node_pool_info.py
@@ -70,6 +70,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -84,6 +85,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -102,6 +107,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -434,7 +441,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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, replace_resource_dict
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone.py b/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone.py
index 5f4558090..83c327a86 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone.py
@@ -234,6 +234,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -248,6 +249,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -268,6 +273,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -476,7 +483,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone_info.py
index c0905abe8..333bfcee7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_dns_managed_zone_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -292,7 +299,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set.py b/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set.py
index cfa2058a9..c98220523 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set.py
@@ -94,6 +94,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -108,6 +109,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set_info.py
index 5fafd645f..622c31021 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_dns_resource_record_set_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -144,7 +151,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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, replace_resource_dict
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance.py b/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance.py
index 7028ffeb4..7895f9c36 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance.py
@@ -131,6 +131,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -145,6 +146,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -167,6 +172,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -287,7 +294,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance_info.py
index 713fcc6f9..55ab27caf 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_filestore_instance_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -197,7 +204,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_iam_role.py b/ansible_collections/google/cloud/plugins/modules/gcp_iam_role.py
index a87aa58f2..8af62c8e8 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_iam_role.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_iam_role.py
@@ -93,6 +93,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -107,6 +108,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -178,7 +183,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpSession,
GcpModule,
GcpRequest,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_iam_role_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_iam_role_info.py
index de791b251..35874cc2f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_iam_role_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_iam_role_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -140,7 +147,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account.py b/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account.py
index fa930145a..d93db04b2 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account.py
@@ -70,6 +70,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -84,6 +85,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -145,7 +150,7 @@ oauth2ClientId:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_info.py
index 5a0d94e13..b2017181f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -139,7 +146,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_key.py b/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_key.py
index 633fd7492..a34718d71 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_key.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_iam_service_account_key.py
@@ -71,8 +71,9 @@ options:
type: dict
path:
description:
- - The full name of the file that will hold the service account private key. The
- management of this file will depend on the value of sync_file parameter.
+ - The full name of the file that will hold the service account private key.
+ - If the file already exists, it will attempt to be read. Ensure the file does
+ not exist or is alreay a valid key.
- File path must be absolute.
required: false
type: path
@@ -89,6 +90,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -103,6 +105,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -187,8 +193,9 @@ serviceAccount:
type: dict
path:
description:
- - The full name of the file that will hold the service account private key. The
- management of this file will depend on the value of sync_file parameter.
+ - The full name of the file that will hold the service account private key.
+ - If the file already exists, it will attempt to be read. Ensure the file does
+ not exist or is alreay a valid key.
- File path must be absolute.
returned: success
type: str
@@ -198,12 +205,10 @@ path:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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, replace_resource_dict
from ansible.module_utils._text import to_native
import json
import os
-import mimetypes
-import hashlib
import base64
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key.py b/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key.py
index bdd6fbc25..40bfae95e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key.py
@@ -118,6 +118,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -132,6 +133,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -152,6 +157,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -258,7 +265,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key_info.py
index 24e98a964..bc40b4846 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_kms_crypto_key_info.py
@@ -58,6 +58,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -72,6 +73,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -90,6 +95,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -182,7 +189,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring.py b/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring.py
index 23bab157d..7f70faacb 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring.py
@@ -72,6 +72,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -86,6 +87,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -106,6 +111,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -147,7 +154,7 @@ location:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring_info.py
index 01e8fadb0..39d3de925 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_kms_key_ring_info.py
@@ -59,6 +59,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -73,6 +74,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -91,6 +96,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -135,7 +142,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric.py b/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric.py
index 5d4740ce8..f89732401 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric.py
@@ -239,6 +239,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -253,6 +254,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -273,6 +278,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -494,7 +501,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric_info.py
index 482a84047..76c323c33 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_logging_metric_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -286,7 +293,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model.py b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model.py
index d143c98b8..e3edaacec 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model.py
@@ -107,6 +107,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -121,6 +122,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -141,6 +146,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -217,7 +224,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model_info.py
index cdd233058..11f28aee5 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_model_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -153,7 +160,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version.py b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version.py
index 5bb0620cc..e19fbe764 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version.py
@@ -170,6 +170,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -184,6 +185,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version_info.py
index da88e7b96..ecf928171 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_mlengine_version_info.py
@@ -62,6 +62,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -76,6 +77,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -94,6 +99,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -244,7 +251,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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, replace_resource_dict
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription.py b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription.py
index 08edb64f2..f39583bee 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription.py
@@ -273,6 +273,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -287,6 +288,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -307,6 +312,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription_info.py
index ee5cf64d1..b911131d7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_subscription_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -317,7 +324,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic.py b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic.py
index 673df4967..28fdb0810 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic.py
@@ -117,6 +117,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -131,6 +132,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -151,6 +156,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -232,7 +239,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic_info.py
index fa194013c..0dc6f4e0f 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_pubsub_topic_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -164,7 +171,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance.py b/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance.py
index fe817c23e..ac8724a0e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance.py
@@ -162,6 +162,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -176,6 +177,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -196,6 +201,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -401,7 +408,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance_info.py
index 86b7d1ce4..33a9241ac 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_redis_instance_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -275,7 +282,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project.py b/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project.py
index 045ec6ee3..cd2d099fa 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project.py
@@ -103,6 +103,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -117,6 +118,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -215,7 +220,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project_info.py
index 1df386436..7d978299a 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_resourcemanager_project_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -172,7 +179,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config.py b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config.py
index cad3c57e7..6fe439eb7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config.py
@@ -71,6 +71,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -85,6 +86,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -126,7 +131,7 @@ name:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config_info.py
index c1aa11bb8..063c1cee9 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_config_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -119,7 +126,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable.py b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable.py
index 6d8de2370..8da87320e 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable.py
@@ -80,6 +80,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -94,6 +95,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -156,7 +161,7 @@ config:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable_info.py
index 7c882f64b..ec1adb922 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_runtimeconfig_variable_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -135,7 +142,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service.py b/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service.py
index fff0d7309..221f7b6c7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service.py
@@ -71,6 +71,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -85,6 +86,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -104,6 +109,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -186,7 +193,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import re
@@ -375,9 +381,13 @@ def wait_for_operation(module, response):
def wait_for_completion(status, op_result, module):
op_id = navigate_hash(op_result, ['name'])
op_uri = async_op_url(module, {'op_id': op_id})
+ sleep_time = 1.0
while not status:
raise_if_errors(op_result, ['error'], module)
- time.sleep(1.0)
+ time.sleep(sleep_time)
+ sleep_time *= 2
+ if sleep_time > 10.0:
+ sleep_time = 10.0
op_result = fetch_resource(module, op_uri, False)
status = navigate_hash(op_result, ['done'])
return op_result
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service_info.py
index 7c57233a1..1c49512ec 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_serviceusage_service_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -162,7 +169,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository.py b/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository.py
index 4e902c149..178cee86a 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository.py
@@ -67,6 +67,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -81,6 +82,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -101,6 +106,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -141,7 +148,7 @@ size:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import re
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository_info.py
index a534ade7e..4a0d809b4 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sourcerepo_repository_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -126,7 +133,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database.py b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database.py
index 4d7356fb3..6c6bce90b 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database.py
@@ -97,6 +97,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -111,6 +112,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -131,6 +136,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database_info.py
index 2f11f1ce4..2f45553d3 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_database_info.py
@@ -62,6 +62,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -76,6 +77,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -94,6 +99,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -151,7 +158,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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, replace_resource_dict
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance.py b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance.py
index 8458042a0..deb212ff8 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance.py
@@ -100,6 +100,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -114,6 +115,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -134,6 +139,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -202,7 +209,7 @@ labels:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance_info.py
index 1fc5fce4f..90e25ddaa 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_spanner_instance_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -149,7 +156,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sql_database.py b/ansible_collections/google/cloud/plugins/modules/gcp_sql_database.py
index c43673daf..685ffee1d 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sql_database.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sql_database.py
@@ -87,6 +87,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -101,6 +102,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -176,7 +181,7 @@ instance:
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sql_database_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_sql_database_info.py
index 4938076fd..dfc9bc9cb 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sql_database_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sql_database_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -142,7 +149,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance.py b/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance.py
index bb19ecf9e..9f18a2f67 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance.py
@@ -370,6 +370,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -384,6 +385,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -809,7 +814,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance_info.py
index 71d09d20e..afbc7c309 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sql_instance_info.py
@@ -52,6 +52,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -66,6 +67,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -84,6 +89,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -503,7 +510,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sql_ssl_cert.py b/ansible_collections/google/cloud/plugins/modules/gcp_sql_ssl_cert.py
index 96e9cc1b9..02519b30d 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sql_ssl_cert.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sql_ssl_cert.py
@@ -88,7 +88,10 @@ options:
sha1_fingerprint:
description:
- The SHA-1 of the certificate.
- required: true
+ type: str
+ private_key:
+ description:
+ - The private key associated with the certificate.
type: str
project:
description:
@@ -103,6 +106,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -117,6 +121,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -193,6 +201,11 @@ sha1Fingerprint:
- The SHA-1 of the certificate.
returned: success
type: str
+privateKey:
+ description:
+ - The private key associated with the certificate.
+ returned: success
+ type: str
'''
################################################################################
@@ -220,7 +233,8 @@ def main():
create_time=dict(type='str'),
expiration_time=dict(type='str'),
instance=dict(required=True, type='dict'),
- sha1_fingerprint=dict(required=True, type='str'),
+ sha1_fingerprint=dict(type='str'),
+ private_key=dict(type='str'),
)
)
@@ -257,12 +271,11 @@ def main():
def create(module, link, kind):
auth = GcpSession(module, 'sql')
- return wait_for_operation(module, auth.post(link, resource_to_request(module)))
+ return wait_for_create_operation(module, auth.post(link, resource_to_request(module)))
def update(module, link, kind):
- auth = GcpSession(module, 'sql')
- return wait_for_operation(module, auth.put(link, resource_to_request(module)))
+ module.fail_json(msg="SQL certificates cannot be modified")
def delete(module, link, kind):
@@ -293,7 +306,8 @@ def fetch_resource(module, link, kind, allow_not_found=True):
def self_link(module):
- res = {'project': module.params['project'], 'instance': replace_resource_dict(module.params['instance'], 'name')}
+ res = {'project': module.params['project'], 'instance': replace_resource_dict(module.params['instance'], 'name'),
+ 'sha1_fingerprint': module.params['sha1_fingerprint']}
return "https://sqladmin.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}".format(**res)
@@ -362,6 +376,31 @@ def async_op_url(module, extra_data=None):
return url.format(**combined)
+# The create response includes the certificate, but it's not usable until
+# the operation completes. The create response is also the only place the
+# private key is available, so return the newly created resource directly.
+def wait_for_create_operation(module, response):
+ op_result = return_if_object(module, response, 'sql#operation')
+ if op_result is None:
+ return {}
+ status = navigate_hash(op_result, ['operation', 'status'])
+ wait_done = wait_for_create_completion(status, op_result, module)
+ res = navigate_hash(op_result, ['clientCert', 'certInfo'])
+ res.update({'privateKey': navigate_hash(op_result, ['clientCert', 'certPrivateKey'])})
+ return res
+
+
+def wait_for_create_completion(status, op_result, module):
+ op_id = navigate_hash(op_result, ['operation', 'name'])
+ op_uri = async_op_url(module, {'op_id': op_id})
+ while status != 'DONE':
+ raise_if_errors(op_result, ['error', 'errors'], module)
+ time.sleep(1.0)
+ op_result = fetch_resource(module, op_uri, 'sql#operation', False)
+ status = navigate_hash(op_result, ['status'])
+ return op_result
+
+
def wait_for_operation(module, response):
op_result = return_if_object(module, response, 'sql#operation')
if op_result is None:
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sql_user.py b/ansible_collections/google/cloud/plugins/modules/gcp_sql_user.py
index d7e211a83..ca2cbf4f9 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sql_user.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sql_user.py
@@ -87,6 +87,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -101,6 +102,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_sql_user_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_sql_user_info.py
index dfb3e08b1..762a73567 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_sql_user_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_sql_user_info.py
@@ -62,6 +62,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -76,6 +77,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -94,6 +99,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -142,7 +149,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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, replace_resource_dict
import json
################################################################################
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket.py b/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket.py
index f9bad465d..18645d956 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket.py
@@ -414,6 +414,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -428,6 +429,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket_access_control.py b/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket_access_control.py
index c6d36a81d..b2b1ea791 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket_access_control.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_storage_bucket_access_control.py
@@ -95,6 +95,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -109,6 +110,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -129,6 +134,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_storage_default_object_acl.py b/ansible_collections/google/cloud/plugins/modules/gcp_storage_default_object_acl.py
index 8a3b538bf..5bfea2f74 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_storage_default_object_acl.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_storage_default_object_acl.py
@@ -60,11 +60,6 @@ options:
bucket:
description:
- The name of the bucket.
- - 'This field represents a link to a Bucket resource in GCP. It can be specified
- in two ways. First, you can place a dictionary with key ''name'' and value of
- your resource''s name Alternatively, you can add `register: name-of-resource`
- to a gcp_storage_bucket task and then set this bucket field to "{{ name-of-resource
- }}"'
required: true
type: dict
entity:
@@ -75,11 +70,6 @@ options:
* project-team-{{projectId}} * allUsers * allAuthenticatedUsers .'
required: true
type: str
- object:
- description:
- - The name of the object, if applied to an object.
- required: false
- type: str
role:
description:
- The access permission for the entity.
@@ -99,6 +89,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -113,6 +104,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -133,6 +128,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -188,21 +185,6 @@ entityId:
- The ID for the entity.
returned: success
type: str
-generation:
- description:
- - The content generation of the object, if applied to an object.
- returned: success
- type: int
-id:
- description:
- - The ID of the access-control entry.
- returned: success
- type: str
-object:
- description:
- - The name of the object, if applied to an object.
- returned: success
- type: str
projectTeam:
description:
- The project team associated with the entity.
@@ -264,10 +246,7 @@ def main():
state = module.params['state']
kind = 'storage#objectAccessControl'
- if module.params['id']:
- fetch = fetch_resource(module, self_link(module), kind)
- else:
- fetch = {}
+ fetch = fetch_resource(module, self_link(module), kind)
changed = False
if fetch:
@@ -386,9 +365,6 @@ def response_to_hash(module, response):
u'email': response.get(u'email'),
u'entity': response.get(u'entity'),
u'entityId': response.get(u'entityId'),
- u'generation': response.get(u'generation'),
- u'id': response.get(u'id'),
- u'object': response.get(u'object'),
u'projectTeam': DefaultObjectACLProjectteam(response.get(u'projectTeam', {}), module).from_response(),
u'role': response.get(u'role'),
}
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_storage_object.py b/ansible_collections/google/cloud/plugins/modules/gcp_storage_object.py
index 6d497bd64..1411d0ffc 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_storage_object.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_storage_object.py
@@ -69,6 +69,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -83,6 +84,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -146,17 +151,10 @@ storage_class:
################################################################################
from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
- navigate_hash,
GcpSession,
GcpModule,
- GcpRequest,
- replace_resource_dict,
)
-import json
import os
-import mimetypes
-import hashlib
-import base64
try:
import google.cloud
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node.py b/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node.py
index 8a7e11fb0..32d599e9c 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node.py
@@ -130,6 +130,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -144,6 +145,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -164,6 +169,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -290,7 +297,6 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
GcpModule,
GcpRequest,
remove_nones_from_dict,
- replace_resource_dict,
)
import json
import time
diff --git a/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node_info.py b/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node_info.py
index cd27a67a0..a01d08af7 100644
--- a/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node_info.py
+++ b/ansible_collections/google/cloud/plugins/modules/gcp_tpu_node_info.py
@@ -57,6 +57,7 @@ options:
- application
- machineaccount
- serviceaccount
+ - accesstoken
service_account_contents:
description:
- The contents of a Service Account JSON file, either in a dictionary or as a
@@ -71,6 +72,10 @@ options:
- An optional service account email address if machineaccount is selected and
the user does not wish to use the default email.
type: str
+ access_token:
+ description:
+ - An OAuth2 access token if credential type is accesstoken.
+ type: str
scopes:
description:
- Array of scopes to be used
@@ -89,6 +94,8 @@ notes:
env variable.
- For authentication, you can set service_account_email using the C(GCP_SERVICE_ACCOUNT_EMAIL)
env variable.
+- For authentication, you can set access_token using the C(GCP_ACCESS_TOKEN)
+ env variable.
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env variable.
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
- Environment variables values will only be used if the playbook values are not set.
@@ -211,7 +218,7 @@ resources:
################################################################################
# Imports
################################################################################
-from ansible_collections.google.cloud.plugins.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
import json
################################################################################