mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-08-04 05:04:27 -07:00
Merge branch 'master' into master
This commit is contained in:
commit
03480489ee
255 changed files with 3886 additions and 661 deletions
|
@ -1,10 +1,5 @@
|
||||||
---
|
---
|
||||||
profile: production
|
profile: production
|
||||||
parseable: true
|
parseable: true
|
||||||
skip_list:
|
|
||||||
- ANSIBLE0010
|
|
||||||
use_default_rules: true
|
use_default_rules: true
|
||||||
verbosity: 1
|
verbosity: 1
|
||||||
exclude_paths:
|
|
||||||
# Ignore submodule https://github.com/GoogleCloudPlatform/google-cloud-ops-agents-ansible
|
|
||||||
- roles/google_cloud_ops_agents/
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ jobs:
|
||||||
ansible_version:
|
ansible_version:
|
||||||
- stable-2.16
|
- stable-2.16
|
||||||
- stable-2.17
|
- stable-2.17
|
||||||
|
- stable-2.18
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: check out code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
162
.github/workflows/ansible-test.yml
vendored
162
.github/workflows/ansible-test.yml
vendored
|
@ -1,71 +1,119 @@
|
||||||
---
|
---
|
||||||
|
# Should be kept up to date with https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
|
||||||
|
# Integration tests are run separately from the ansible-integration-tests.yml workflow.
|
||||||
name: Run tests for the cloud.google collection
|
name: Run tests for the cloud.google collection
|
||||||
on: [pull_request]
|
on:
|
||||||
|
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- stable-*
|
||||||
|
pull_request:
|
||||||
|
# Run CI once per day (at 06:00 UTC)
|
||||||
|
# This ensures that even if there haven't been commits that we are still
|
||||||
|
# testing against latest version of ansible-test for each ansible-core
|
||||||
|
# version
|
||||||
|
schedule:
|
||||||
|
- cron: '0 6 * * *'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: >-
|
||||||
|
${{ github.workflow }}-${{
|
||||||
|
github.event.pull_request.number || github.sha
|
||||||
|
}}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sanity-and-lint:
|
|
||||||
runs-on: ubuntu-latest
|
###
|
||||||
defaults:
|
# Sanity tests (REQUIRED)
|
||||||
run:
|
#
|
||||||
working-directory: ansible_collections/google/cloud
|
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
|
||||||
|
|
||||||
|
sanity:
|
||||||
|
name: Sanity (Ⓐ${{ matrix.ansible }})
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# Our version strategy is to test against the current and previous version
|
ansible:
|
||||||
# of ansible-core and each major version of Python supported by both.
|
# It's important that Sanity is tested against all stable-X.Y branches
|
||||||
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
|
# Testing against `devel` may fail as new tests are added.
|
||||||
ansible_version:
|
# An alternative to `devel` is the `milestone` branch with
|
||||||
|
# gets synchronized with `devel` every few weeks and therefore
|
||||||
|
# tends to be a more stable target. Be aware that it is not updated
|
||||||
|
# around creation of a new stable branch, this might cause a problem
|
||||||
|
# that two different versions of ansible-test use the same sanity test
|
||||||
|
# ignore.txt file.
|
||||||
|
# Add new versions announced in
|
||||||
|
# https://github.com/ansible-collections/news-for-maintainers in a timely manner,
|
||||||
|
# consider dropping testing against EOL versions and versions you don't support.
|
||||||
- stable-2.16
|
- stable-2.16
|
||||||
- stable-2.17
|
- stable-2.17
|
||||||
python_version:
|
- stable-2.18
|
||||||
- '3.10'
|
- devel
|
||||||
- '3.11'
|
# - milestone
|
||||||
- '3.12'
|
|
||||||
steps:
|
|
||||||
- name: check out code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
path: ansible_collections/google/cloud
|
|
||||||
submodules: 'true'
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python_version }}
|
|
||||||
- name: Install ansible-base (${{ matrix.ansible_version }})
|
|
||||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
|
|
||||||
- name: Run ansible-test sanity
|
|
||||||
# validate-modules cannot be turned on until #498 is resolved.
|
|
||||||
run: ansible-test sanity -v --color --skip validate-modules
|
|
||||||
- name: Install ansible-lint
|
|
||||||
run: pip install ansible-lint==24.7.0
|
|
||||||
- name: Run ansible-lint
|
|
||||||
run: ansible-lint --exclude roles/google_cloud_ops_agents/
|
|
||||||
unit:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
steps:
|
||||||
working-directory: ansible_collections/google/cloud
|
# Run sanity tests inside a Docker container.
|
||||||
|
# The docker container has all the pinned dependencies that are
|
||||||
|
# required and all Python versions Ansible supports.
|
||||||
|
- name: Perform sanity testing
|
||||||
|
# See the documentation for the following GitHub action on
|
||||||
|
# https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md
|
||||||
|
uses: ansible-community/ansible-test-gh-action@release/v1
|
||||||
|
with:
|
||||||
|
ansible-core-version: ${{ matrix.ansible }}
|
||||||
|
testing-type: sanity
|
||||||
|
# OPTIONAL If your sanity tests require code
|
||||||
|
# from other collections, install them like this
|
||||||
|
# test-deps: >-
|
||||||
|
# ansible.netcommon
|
||||||
|
# ansible.utils
|
||||||
|
# OPTIONAL If set to true, will test only against changed files,
|
||||||
|
# which should improve CI performance. See limitations on
|
||||||
|
# https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection
|
||||||
|
pull-request-change-detection: false
|
||||||
|
|
||||||
|
###
|
||||||
|
# Unit tests (OPTIONAL)
|
||||||
|
#
|
||||||
|
# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
|
||||||
|
|
||||||
|
units:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
name: Units (Ⓐ${{ matrix.ansible }})
|
||||||
strategy:
|
strategy:
|
||||||
|
# As soon as the first unit test fails, cancel the others to free up the CI queue
|
||||||
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
ansible_version:
|
ansible:
|
||||||
|
# Add new versions announced in
|
||||||
|
# https://github.com/ansible-collections/news-for-maintainers in a timely manner,
|
||||||
|
# consider dropping testing against EOL versions and versions you don't support.
|
||||||
- stable-2.16
|
- stable-2.16
|
||||||
- stable-2.17
|
- stable-2.17
|
||||||
python_version:
|
- stable-2.18
|
||||||
- '3.10'
|
- devel
|
||||||
- '3.11'
|
# - milestone
|
||||||
- '3.12'
|
|
||||||
steps:
|
steps:
|
||||||
- name: check out code
|
- name: >-
|
||||||
uses: actions/checkout@v4
|
Perform unit testing against
|
||||||
|
Ansible version ${{ matrix.ansible }}
|
||||||
|
# See the documentation for the following GitHub action on
|
||||||
|
# https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md
|
||||||
|
uses: ansible-community/ansible-test-gh-action@release/v1
|
||||||
with:
|
with:
|
||||||
path: ansible_collections/google/cloud
|
ansible-core-version: ${{ matrix.ansible }}
|
||||||
- name: Set up Python
|
testing-type: units
|
||||||
uses: actions/setup-python@v4
|
# OPTIONAL If your unit tests require code
|
||||||
with:
|
# from other collections, install them like this
|
||||||
python-version: ${{ matrix.python_version }}
|
test-deps: >-
|
||||||
- name: Install dependencies
|
ansible.netcommon
|
||||||
run: pip install -r requirements.txt
|
ansible.utils
|
||||||
- name: Install test dependencies
|
# OPTIONAL If set to true, will test only against changed files,
|
||||||
run: pip install -r requirements-test.txt
|
# which should improve CI performance. See limitations on
|
||||||
- name: Install ansible-base (${{ matrix.ansible_version }})
|
# https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection
|
||||||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
|
pull-request-change-detection: false
|
||||||
- name: Run unit tests
|
|
||||||
run: ansible-test units -v --color --python "${{ matrix.python_version }}"
|
|
||||||
|
|
4
.github/workflows/gcloud.yml
vendored
4
.github/workflows/gcloud.yml
vendored
|
@ -31,10 +31,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ansible_collections/google/cloud
|
path: ansible_collections/google/cloud
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
4
.github/workflows/gcsfuse.yml
vendored
4
.github/workflows/gcsfuse.yml
vendored
|
@ -26,10 +26,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ansible_collections/google/cloud
|
path: ansible_collections/google/cloud
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
||||||
[submodule "roles/google_cloud_ops_agents"]
|
|
||||||
path = roles/google_cloud_ops_agents
|
|
||||||
url = https://github.com/GoogleCloudPlatform/google-cloud-ops-agents-ansible.git
|
|
|
@ -15,7 +15,8 @@ rules:
|
||||||
commas:
|
commas:
|
||||||
max-spaces-after: -1
|
max-spaces-after: -1
|
||||||
level: error
|
level: error
|
||||||
comments: disable
|
comments:
|
||||||
|
min-spaces-from-content: 1
|
||||||
comments-indentation: disable
|
comments-indentation: disable
|
||||||
document-start: disable
|
document-start: disable
|
||||||
empty-lines:
|
empty-lines:
|
||||||
|
@ -29,5 +30,8 @@ rules:
|
||||||
new-line-at-end-of-file: disable
|
new-line-at-end-of-file: disable
|
||||||
new-lines:
|
new-lines:
|
||||||
type: unix
|
type: unix
|
||||||
|
octal-values:
|
||||||
|
forbid-implicit-octal: true
|
||||||
|
forbid-explicit-octal: true
|
||||||
trailing-spaces: disable
|
trailing-spaces: disable
|
||||||
truthy: disable
|
truthy: disable
|
||||||
|
|
|
@ -4,6 +4,70 @@ Google.Cloud Release Notes
|
||||||
|
|
||||||
.. contents:: Topics
|
.. contents:: Topics
|
||||||
|
|
||||||
|
v1.6.0
|
||||||
|
======
|
||||||
|
|
||||||
|
Minor Changes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- gcp_compute - added GVNIC support to compute instance (https://github.com/ansible-collections/google.cloud/pull/688).
|
||||||
|
- gcp_compute - added ``discard_local_ssd`` flag to compute instance (https://github.com/ansible-collections/google.cloud/pull/686).
|
||||||
|
- gcp_compute - added hostname support to dynamic inventory (https://github.com/ansible-collections/google.cloud/pull/689).
|
||||||
|
- gcp_secret_manager - added support for regional secret manager (https://github.com/ansible-collections/google.cloud/pull/685).
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- gcp_secret_manager - cleaned up error responses (https://github.com/ansible-collections/google.cloud/pull/690).
|
||||||
|
- gcp_serviceusage_service - updated documentation (https://github.com/ansible-collections/google.cloud/pull/691).
|
||||||
|
|
||||||
|
v1.5.3
|
||||||
|
======
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- updated README to match required format (https://github.com/ansible-collections/google.cloud/pull/682).
|
||||||
|
|
||||||
|
v1.5.2
|
||||||
|
======
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- gcp_compute - fixed get_project_disks to process all responses (https://github.com/ansible-collections/google.cloud/pull/677).
|
||||||
|
|
||||||
|
v1.5.1
|
||||||
|
======
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- run integration test with Ansible 2.16 to match `requires_ansible` version
|
||||||
|
|
||||||
|
v1.5.0
|
||||||
|
======
|
||||||
|
|
||||||
|
Major Changes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- google_cloud_ops_agents - role submodule removed because it prevents the collection from passing sanity and lint tests
|
||||||
|
|
||||||
|
Minor Changes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- gcp_pubsub_subscription - allows to create GCS subscription
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- ansible - 2.17 is now the minimum version supported
|
||||||
|
- ansible - 3.11 is now the minimum Python version
|
||||||
|
- ansible-test - fixed sanity tests
|
||||||
|
- ansible-test - integration tests are now run against 2.17 and 2.18
|
||||||
|
- gcp_bigquery_table - properly handle BigQuery table clustering fields
|
||||||
|
- gcp_pubsub_subscription - fixed improper subscription uprade PATCH request
|
||||||
|
|
||||||
v1.4.1
|
v1.4.1
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|
352
README.md
352
README.md
|
@ -1,9 +1,248 @@
|
||||||
# Google Cloud Platform Ansible Collection
|
# Google Cloud Platform Ansible Collection
|
||||||
This collection provides a series of Ansible modules and plugins for interacting with the [Google Cloud Platform](https://cloud.google.com)
|
|
||||||
|
|
||||||
This collection works with Ansible 2.16+
|
This collection provides a series of Ansible modules and plugins for
|
||||||
|
interacting with the [Google Cloud Platform](https://cloud.google.com)
|
||||||
|
|
||||||
# Communication
|
## Description
|
||||||
|
|
||||||
|
The google.cloud collection provides a way to automate provisioning,
|
||||||
|
configuration, and management of Google Cloud resources using Ansible
|
||||||
|
playbooks. This collection includes modules for managing various
|
||||||
|
Google Cloud services such as Compute Engine instances, Cloud Storage
|
||||||
|
buckets, Cloud SQL instances, and more.
|
||||||
|
|
||||||
|
### Resources Supported
|
||||||
|
|
||||||
|
* App Engine FirewallRule (gcp_appengine_firewall_rule, gcp_appengine_firewall_rule_info)
|
||||||
|
* BigQuery Dataset (gcp_bigquery_dataset, gcp_bigquery_dataset_info)
|
||||||
|
* BigQuery Table (gcp_bigquery_table, gcp_bigquery_table_info)
|
||||||
|
* Cloud Bigtable Instance (gcp_bigtable_instance, gcp_bigtable_instance_info)
|
||||||
|
* Cloud Build Trigger (gcp_cloudbuild_trigger, gcp_cloudbuild_trigger_info)
|
||||||
|
* Cloud Functions CloudFunction (gcp_cloudfunctions_cloud_function, gcp_cloudfunctions_cloud_function_info)
|
||||||
|
* Cloud Scheduler Job (gcp_cloudscheduler_job, gcp_cloudscheduler_job_info)
|
||||||
|
* Cloud Tasks Queue (gcp_cloudtasks_queue, gcp_cloudtasks_queue_info)
|
||||||
|
* Compute Engine Address (gcp_compute_address, gcp_compute_address_info)
|
||||||
|
* Compute Engine Autoscaler (gcp_compute_autoscaler, gcp_compute_autoscaler_info)
|
||||||
|
* Compute Engine BackendBucket (gcp_compute_backend_bucket, gcp_compute_backend_bucket_info)
|
||||||
|
* Compute Engine BackendService (gcp_compute_backend_service, gcp_compute_backend_service_info)
|
||||||
|
* Compute Engine RegionBackendService (gcp_compute_region_backend_service, gcp_compute_region_backend_service_info)
|
||||||
|
* Compute Engine Disk (gcp_compute_disk, gcp_compute_disk_info)
|
||||||
|
* Compute Engine Firewall (gcp_compute_firewall, gcp_compute_firewall_info)
|
||||||
|
* Compute Engine ForwardingRule (gcp_compute_forwarding_rule, gcp_compute_forwarding_rule_info)
|
||||||
|
* Compute Engine GlobalAddress (gcp_compute_global_address, gcp_compute_global_address_info)
|
||||||
|
* Compute Engine GlobalForwardingRule (gcp_compute_global_forwarding_rule, gcp_compute_global_forwarding_rule_info)
|
||||||
|
* Compute Engine HttpHealthCheck (gcp_compute_http_health_check, gcp_compute_http_health_check_info)
|
||||||
|
* Compute Engine HttpsHealthCheck (gcp_compute_https_health_check, gcp_compute_https_health_check_info)
|
||||||
|
* Compute Engine HealthCheck (gcp_compute_health_check, gcp_compute_health_check_info)
|
||||||
|
* Compute Engine InstanceTemplate (gcp_compute_instance_template, gcp_compute_instance_template_info)
|
||||||
|
* Compute Engine Image (gcp_compute_image, gcp_compute_image_info)
|
||||||
|
* Compute Engine Instance (gcp_compute_instance, gcp_compute_instance_info)
|
||||||
|
* Compute Engine InstanceGroup (gcp_compute_instance_group, gcp_compute_instance_group_info)
|
||||||
|
* Compute Engine InstanceGroupManager (gcp_compute_instance_group_manager, gcp_compute_instance_group_manager_info)
|
||||||
|
* Compute Engine RegionInstanceGroupManager (gcp_compute_region_instance_group_manager, gcp_compute_region_instance_group_manager_info)
|
||||||
|
* Compute Engine InterconnectAttachment (gcp_compute_interconnect_attachment, gcp_compute_interconnect_attachment_info)
|
||||||
|
* Compute Engine Network (gcp_compute_network, gcp_compute_network_info)
|
||||||
|
* Compute Engine NetworkEndpointGroup (gcp_compute_network_endpoint_group, gcp_compute_network_endpoint_group_info)
|
||||||
|
* Compute Engine NodeGroup (gcp_compute_node_group, gcp_compute_node_group_info)
|
||||||
|
* Compute Engine NodeTemplate (gcp_compute_node_template, gcp_compute_node_template_info)
|
||||||
|
* Compute Engine RegionAutoscaler (gcp_compute_region_autoscaler, gcp_compute_region_autoscaler_info)
|
||||||
|
* Compute Engine RegionDisk (gcp_compute_region_disk, gcp_compute_region_disk_info)
|
||||||
|
* Compute Engine RegionUrlMap (gcp_compute_region_url_map, gcp_compute_region_url_map_info)
|
||||||
|
* Compute Engine RegionHealthCheck (gcp_compute_region_health_check, gcp_compute_region_health_check_info)
|
||||||
|
* Compute Engine ResourcePolicy (gcp_compute_resource_policy, gcp_compute_resource_policy_info)
|
||||||
|
* Compute Engine Route (gcp_compute_route, gcp_compute_route_info)
|
||||||
|
* Compute Engine Router (gcp_compute_router, gcp_compute_router_info)
|
||||||
|
* Compute Engine Snapshot (gcp_compute_snapshot, gcp_compute_snapshot_info)
|
||||||
|
* Compute Engine SslCertificate (gcp_compute_ssl_certificate, gcp_compute_ssl_certificate_info)
|
||||||
|
* Compute Engine Reservation (gcp_compute_reservation, gcp_compute_reservation_info)
|
||||||
|
* Compute Engine SslPolicy (gcp_compute_ssl_policy, gcp_compute_ssl_policy_info)
|
||||||
|
* Compute Engine Subnetwork (gcp_compute_subnetwork, gcp_compute_subnetwork_info)
|
||||||
|
* Compute Engine TargetHttpProxy (gcp_compute_target_http_proxy, gcp_compute_target_http_proxy_info)
|
||||||
|
* Compute Engine TargetHttpsProxy (gcp_compute_target_https_proxy, gcp_compute_target_https_proxy_info)
|
||||||
|
* Compute Engine RegionTargetHttpProxy (gcp_compute_region_target_http_proxy, gcp_compute_region_target_http_proxy_info)
|
||||||
|
* Compute Engine RegionTargetHttpsProxy (gcp_compute_region_target_https_proxy, gcp_compute_region_target_https_proxy_info)
|
||||||
|
* Compute Engine TargetInstance (gcp_compute_target_instance, gcp_compute_target_instance_info)
|
||||||
|
* Compute Engine TargetPool (gcp_compute_target_pool, gcp_compute_target_pool_info)
|
||||||
|
* Compute Engine TargetSslProxy (gcp_compute_target_ssl_proxy, gcp_compute_target_ssl_proxy_info)
|
||||||
|
* Compute Engine TargetTcpProxy (gcp_compute_target_tcp_proxy, gcp_compute_target_tcp_proxy_info)
|
||||||
|
* Compute Engine TargetVpnGateway (gcp_compute_target_vpn_gateway, gcp_compute_target_vpn_gateway_info)
|
||||||
|
* Compute Engine UrlMap (gcp_compute_url_map, gcp_compute_url_map_info)
|
||||||
|
* Compute Engine VpnTunnel (gcp_compute_vpn_tunnel, gcp_compute_vpn_tunnel_info)
|
||||||
|
* Google Kubernetes Engine Cluster (gcp_container_cluster, gcp_container_cluster_info)
|
||||||
|
* Google Kubernetes Engine NodePool (gcp_container_node_pool, gcp_container_node_pool_info)
|
||||||
|
* Cloud DNS ManagedZone (gcp_dns_managed_zone, gcp_dns_managed_zone_info)
|
||||||
|
* Cloud DNS ResourceRecordSet (gcp_dns_resource_record_set, gcp_dns_resource_record_set_info)
|
||||||
|
* Filestore Instance (gcp_filestore_instance, gcp_filestore_instance_info)
|
||||||
|
* Cloud IAM Role (gcp_iam_role, gcp_iam_role_info)
|
||||||
|
* Cloud IAM ServiceAccount (gcp_iam_service_account, gcp_iam_service_account_info)
|
||||||
|
* Cloud IAM ServiceAccountKey (gcp_iam_service_account_key, gcp_iam_service_account_key_info)
|
||||||
|
* Cloud Key Management Service KeyRing (gcp_kms_key_ring, gcp_kms_key_ring_info)
|
||||||
|
* Cloud Key Management Service CryptoKey (gcp_kms_crypto_key, gcp_kms_crypto_key_info)
|
||||||
|
* Cloud (Stackdriver) Logging Metric (gcp_logging_metric, gcp_logging_metric_info)
|
||||||
|
* ML Engine Model (gcp_mlengine_model, gcp_mlengine_model_info)
|
||||||
|
* ML Engine Version (gcp_mlengine_version, gcp_mlengine_version_info)
|
||||||
|
* Cloud Pub/Sub Topic (gcp_pubsub_topic, gcp_pubsub_topic_info)
|
||||||
|
* Cloud Pub/Sub Subscription (gcp_pubsub_subscription, gcp_pubsub_subscription_info)
|
||||||
|
* Memorystore (Redis) Instance (gcp_redis_instance, gcp_redis_instance_info)
|
||||||
|
* Resource Manager Project (gcp_resourcemanager_project, gcp_resourcemanager_project_info)
|
||||||
|
* Runtime Configurator Config (gcp_runtimeconfig_config, gcp_runtimeconfig_config_info)
|
||||||
|
* Runtime Configurator Variable (gcp_runtimeconfig_variable, gcp_runtimeconfig_variable_info)
|
||||||
|
* Service Usage Service (gcp_serviceusage_service, gcp_serviceusage_service_info)
|
||||||
|
* Cloud Source Repositories Repository (gcp_sourcerepo_repository, gcp_sourcerepo_repository_info)
|
||||||
|
* Cloud Spanner Instance (gcp_spanner_instance, gcp_spanner_instance_info)
|
||||||
|
* Cloud Spanner Database (gcp_spanner_database, gcp_spanner_database_info)
|
||||||
|
* Cloud SQL Instance (gcp_sql_instance, gcp_sql_instance_info)
|
||||||
|
* Cloud SQL Database (gcp_sql_database, gcp_sql_database_info)
|
||||||
|
* Cloud SQL User (gcp_sql_user, gcp_sql_user_info)
|
||||||
|
* Cloud SQL SslCert (gcp_sql_ssl_cert, gcp_sql_ssl_cert_info)
|
||||||
|
* Cloud Storage Bucket (gcp_storage_bucket, gcp_storage_bucket_info)
|
||||||
|
* Cloud Storage BucketAccessControl (gcp_storage_bucket_access_control, gcp_storage_bucket_access_control_info)
|
||||||
|
* Cloud Storage DefaultObjectACL (gcp_storage_default_object_acl, gcp_storage_default_object_acl_info)
|
||||||
|
* Cloud TPU Node (gcp_tpu_node, gcp_tpu_node_info)
|
||||||
|
* Secret Manager (gcp_secret_manager)
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
### Ansible version compatibility
|
||||||
|
|
||||||
|
This collection is tested to work with Ansible 2.16+.
|
||||||
|
|
||||||
|
### Python version compatibility
|
||||||
|
|
||||||
|
This collection is tested with to work Python 3.10+
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Before using this collection, you need to install it with the Ansible Galaxy
|
||||||
|
command-line tool:
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-galaxy collection install google.cloud
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also include it in a requirements.yml file and install it with
|
||||||
|
ansible-galaxy collection install -r requirements.yml, using the format:
|
||||||
|
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
collections:
|
||||||
|
- name: google.cloud
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that if you install any collections from Ansible Galaxy, they will not be
|
||||||
|
upgraded automatically when you upgrade the Ansible package.
|
||||||
|
To upgrade the collection to the latest available version, run the following
|
||||||
|
command:
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-galaxy collection install google.cloud --upgrade
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also install a specific version of the collection, for example, if you
|
||||||
|
need to downgrade when something is broken in the latest version (please
|
||||||
|
report an issue in this repository). Use the following syntax to install
|
||||||
|
version 1.5.1:
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-galaxy collection install google.cloud:==1.5.1
|
||||||
|
```
|
||||||
|
|
||||||
|
See [using Ansible collections](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for more details.
|
||||||
|
|
||||||
|
If you are using the google.cloud collection locally you will likely need
|
||||||
|
to install the [gcloud command line tool](https://cloud.google.com/sdk/docs/install#rpm)
|
||||||
|
in order to perform authentication The easiest way to
|
||||||
|
authenticate to GCP is using [application default credentials](https://cloud.google.com/sdk/docs/authorizing#adc).
|
||||||
|
|
||||||
|
Once you have installed `gcloud` and performed basic initialization
|
||||||
|
(via `gcloud init`) run:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
gcloud auth application-default login
|
||||||
|
```
|
||||||
|
|
||||||
|
For more authentication options see the Use Cases section below.
|
||||||
|
|
||||||
|
## Use Cases
|
||||||
|
|
||||||
|
The google.cloud collection supports multiple methods to authenticate to Google
|
||||||
|
Cloud:
|
||||||
|
|
||||||
|
* Application Default Credentials (`auth_kind: "application"`)
|
||||||
|
* Service Account Key (`auth_kind: "serviceaccount"`)
|
||||||
|
* OAuth Credentials (`auth_kind: "accesstoken"`)
|
||||||
|
|
||||||
|
To use Application default credentials configured using `gcloud`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Create a Google Cloud Storage bucket
|
||||||
|
google.cloud.gcp_storage_bucket:
|
||||||
|
name: "{{ bucket_name }}"
|
||||||
|
project: "{{ gcp_project }}"
|
||||||
|
auth_kind: "application"
|
||||||
|
state: present
|
||||||
|
- name: Delete a Google Cloud Storage bucket
|
||||||
|
google.cloud.gcp_storage_bucket:
|
||||||
|
name: "{{ bucket_name }}"
|
||||||
|
project: "{{ gcp_project }}"
|
||||||
|
auth_kind: "application"
|
||||||
|
state: absent
|
||||||
|
```
|
||||||
|
|
||||||
|
For unattended operation it is common to use service account keys. To use
|
||||||
|
these, set `auth_kind` to `serviceaccount` and `service_account_file` to
|
||||||
|
the path to the file containing your service account key.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Create a Google Cloud Storage bucket
|
||||||
|
google.cloud.gcp_storage_bucket:
|
||||||
|
name: "{{ bucket_name }}"
|
||||||
|
project: "{{ gcp_project }}"
|
||||||
|
auth_kind: "serviceaccount"
|
||||||
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
state: present
|
||||||
|
- name: Delete a Google Cloud Storage bucket
|
||||||
|
google.cloud.gcp_storage_bucket:
|
||||||
|
name: "{{ bucket_name }}"
|
||||||
|
project: "{{ gcp_project }}"
|
||||||
|
auth_kind: "serviceaccount"
|
||||||
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
|
state: absent
|
||||||
|
```
|
||||||
|
|
||||||
|
In place of `service_account_file` you may instead use
|
||||||
|
`service_account_contents` which contains the service account key
|
||||||
|
directly.
|
||||||
|
|
||||||
|
Read the [best practices for managing service account keys](https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys)
|
||||||
|
to learn how to keep your service account key and your GCP resources safe.
|
||||||
|
|
||||||
|
Common options can also be set using environment variables, simplifying
|
||||||
|
automated operations. The available variables are:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
export GCP_PROJECT=<project id>
|
||||||
|
export GCP_AUTH_KIND=<application|serviceaccount|accesstoken>
|
||||||
|
export GCP_SERVICE_ACCOUNT_FILE=</path/to/service/account/key.json>
|
||||||
|
export GCP_SERVICE_ACCOUNT_CONTENTS=<alternative that stores the service account key in the env var>
|
||||||
|
export GCP_SCOPES=<requested scopes such as https://www.googleapis.com/auth/compute>
|
||||||
|
export GCP_REGION=<default region such as us-central1>
|
||||||
|
export GCP_ZONE=<default zone such as us-central1-a>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
The google.cloud collection is tested with the two most recent releases of
|
||||||
|
Ansible with the versions of Python supported by those releases. The
|
||||||
|
current version matrix can be seen in the
|
||||||
|
[GitHub action configuration](https://github.com/ansible-collections/google.cloud/blob/master/.github/workflows/ansible-integration-tests.yml).
|
||||||
|
|
||||||
|
To learn how to run the tests locally, read
|
||||||
|
[CONTRIBUTING.md](https://github.com/ansible-collections/google.cloud/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
There are several avenues of commuication available for google.cloud users:
|
||||||
|
|
||||||
* Join the Ansible forum:
|
* Join the Ansible forum:
|
||||||
* [Get Help](https://forum.ansible.com/c/help/6): get help or help others. Please use appropriate tags, for example `cloud`.
|
* [Get Help](https://forum.ansible.com/c/help/6): get help or help others. Please use appropriate tags, for example `cloud`.
|
||||||
|
@ -14,96 +253,19 @@ This collection works with Ansible 2.16+
|
||||||
|
|
||||||
For more information about communication, see the [Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
|
For more information about communication, see the [Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
|
||||||
|
|
||||||
# Installation
|
## Release Notes
|
||||||
```bash
|
|
||||||
ansible-galaxy collection install google.cloud
|
|
||||||
```
|
|
||||||
|
|
||||||
# Resources Supported
|
See [CHANGELOG.md](https://github.com/ansible-collections/google.cloud/blob/master/CHANGELOG.rst).
|
||||||
* App Engine FirewallRule (gcp_appengine_firewall_rule, gcp_appengine_firewall_rule_info)
|
|
||||||
* BigQuery Dataset (gcp_bigquery_dataset, gcp_bigquery_dataset_info)
|
## Related Information
|
||||||
* BigQuery Table (gcp_bigquery_table, gcp_bigquery_table_info)
|
|
||||||
* Cloud Bigtable Instance (gcp_bigtable_instance, gcp_bigtable_instance_info)
|
Documentation for Google Cloud Platform can be found at [cloud.google.com](https://cloud.google.com/docs/).
|
||||||
* Cloud Build Trigger (gcp_cloudbuild_trigger, gcp_cloudbuild_trigger_info)
|
|
||||||
* Cloud Functions CloudFunction (gcp_cloudfunctions_cloud_function, gcp_cloudfunctions_cloud_function_info)
|
Documentation for google.cloud resources can be found on the [Ansible Galaxy site](https://galaxy.ansible.com/ui/repo/published/google/cloud/docs/).
|
||||||
* Cloud Scheduler Job (gcp_cloudscheduler_job, gcp_cloudscheduler_job_info)
|
|
||||||
* Cloud Tasks Queue (gcp_cloudtasks_queue, gcp_cloudtasks_queue_info)
|
## License Information
|
||||||
* Compute Engine Address (gcp_compute_address, gcp_compute_address_info)
|
|
||||||
* Compute Engine Autoscaler (gcp_compute_autoscaler, gcp_compute_autoscaler_info)
|
GNU General Public License v3.0 or later.
|
||||||
* Compute Engine BackendBucket (gcp_compute_backend_bucket, gcp_compute_backend_bucket_info)
|
|
||||||
* Compute Engine BackendService (gcp_compute_backend_service, gcp_compute_backend_service_info)
|
See [LICENSE](https://github.com/ansible-collections/google.cloud/blob/master/LICENSE)
|
||||||
* Compute Engine RegionBackendService (gcp_compute_region_backend_service, gcp_compute_region_backend_service_info)
|
to view the full text.
|
||||||
* Compute Engine Disk (gcp_compute_disk, gcp_compute_disk_info)
|
|
||||||
* Compute Engine Firewall (gcp_compute_firewall, gcp_compute_firewall_info)
|
|
||||||
* Compute Engine ForwardingRule (gcp_compute_forwarding_rule, gcp_compute_forwarding_rule_info)
|
|
||||||
* Compute Engine GlobalAddress (gcp_compute_global_address, gcp_compute_global_address_info)
|
|
||||||
* Compute Engine GlobalForwardingRule (gcp_compute_global_forwarding_rule, gcp_compute_global_forwarding_rule_info)
|
|
||||||
* Compute Engine HttpHealthCheck (gcp_compute_http_health_check, gcp_compute_http_health_check_info)
|
|
||||||
* Compute Engine HttpsHealthCheck (gcp_compute_https_health_check, gcp_compute_https_health_check_info)
|
|
||||||
* Compute Engine HealthCheck (gcp_compute_health_check, gcp_compute_health_check_info)
|
|
||||||
* Compute Engine InstanceTemplate (gcp_compute_instance_template, gcp_compute_instance_template_info)
|
|
||||||
* Compute Engine Image (gcp_compute_image, gcp_compute_image_info)
|
|
||||||
* Compute Engine Instance (gcp_compute_instance, gcp_compute_instance_info)
|
|
||||||
* Compute Engine InstanceGroup (gcp_compute_instance_group, gcp_compute_instance_group_info)
|
|
||||||
* Compute Engine InstanceGroupManager (gcp_compute_instance_group_manager, gcp_compute_instance_group_manager_info)
|
|
||||||
* Compute Engine RegionInstanceGroupManager (gcp_compute_region_instance_group_manager, gcp_compute_region_instance_group_manager_info)
|
|
||||||
* Compute Engine InterconnectAttachment (gcp_compute_interconnect_attachment, gcp_compute_interconnect_attachment_info)
|
|
||||||
* Compute Engine Network (gcp_compute_network, gcp_compute_network_info)
|
|
||||||
* Compute Engine NetworkEndpointGroup (gcp_compute_network_endpoint_group, gcp_compute_network_endpoint_group_info)
|
|
||||||
* Compute Engine NodeGroup (gcp_compute_node_group, gcp_compute_node_group_info)
|
|
||||||
* Compute Engine NodeTemplate (gcp_compute_node_template, gcp_compute_node_template_info)
|
|
||||||
* Compute Engine RegionAutoscaler (gcp_compute_region_autoscaler, gcp_compute_region_autoscaler_info)
|
|
||||||
* Compute Engine RegionDisk (gcp_compute_region_disk, gcp_compute_region_disk_info)
|
|
||||||
* Compute Engine RegionUrlMap (gcp_compute_region_url_map, gcp_compute_region_url_map_info)
|
|
||||||
* Compute Engine RegionHealthCheck (gcp_compute_region_health_check, gcp_compute_region_health_check_info)
|
|
||||||
* Compute Engine ResourcePolicy (gcp_compute_resource_policy, gcp_compute_resource_policy_info)
|
|
||||||
* Compute Engine Route (gcp_compute_route, gcp_compute_route_info)
|
|
||||||
* Compute Engine Router (gcp_compute_router, gcp_compute_router_info)
|
|
||||||
* Compute Engine Snapshot (gcp_compute_snapshot, gcp_compute_snapshot_info)
|
|
||||||
* Compute Engine SslCertificate (gcp_compute_ssl_certificate, gcp_compute_ssl_certificate_info)
|
|
||||||
* Compute Engine Reservation (gcp_compute_reservation, gcp_compute_reservation_info)
|
|
||||||
* Compute Engine SslPolicy (gcp_compute_ssl_policy, gcp_compute_ssl_policy_info)
|
|
||||||
* Compute Engine Subnetwork (gcp_compute_subnetwork, gcp_compute_subnetwork_info)
|
|
||||||
* Compute Engine TargetHttpProxy (gcp_compute_target_http_proxy, gcp_compute_target_http_proxy_info)
|
|
||||||
* Compute Engine TargetHttpsProxy (gcp_compute_target_https_proxy, gcp_compute_target_https_proxy_info)
|
|
||||||
* Compute Engine RegionTargetHttpProxy (gcp_compute_region_target_http_proxy, gcp_compute_region_target_http_proxy_info)
|
|
||||||
* Compute Engine RegionTargetHttpsProxy (gcp_compute_region_target_https_proxy, gcp_compute_region_target_https_proxy_info)
|
|
||||||
* Compute Engine TargetInstance (gcp_compute_target_instance, gcp_compute_target_instance_info)
|
|
||||||
* Compute Engine TargetPool (gcp_compute_target_pool, gcp_compute_target_pool_info)
|
|
||||||
* Compute Engine TargetSslProxy (gcp_compute_target_ssl_proxy, gcp_compute_target_ssl_proxy_info)
|
|
||||||
* Compute Engine TargetTcpProxy (gcp_compute_target_tcp_proxy, gcp_compute_target_tcp_proxy_info)
|
|
||||||
* Compute Engine TargetVpnGateway (gcp_compute_target_vpn_gateway, gcp_compute_target_vpn_gateway_info)
|
|
||||||
* Compute Engine UrlMap (gcp_compute_url_map, gcp_compute_url_map_info)
|
|
||||||
* Compute Engine VpnTunnel (gcp_compute_vpn_tunnel, gcp_compute_vpn_tunnel_info)
|
|
||||||
* Google Kubernetes Engine Cluster (gcp_container_cluster, gcp_container_cluster_info)
|
|
||||||
* Google Kubernetes Engine NodePool (gcp_container_node_pool, gcp_container_node_pool_info)
|
|
||||||
* Cloud DNS ManagedZone (gcp_dns_managed_zone, gcp_dns_managed_zone_info)
|
|
||||||
* Cloud DNS ResourceRecordSet (gcp_dns_resource_record_set, gcp_dns_resource_record_set_info)
|
|
||||||
* Filestore Instance (gcp_filestore_instance, gcp_filestore_instance_info)
|
|
||||||
* Cloud IAM Role (gcp_iam_role, gcp_iam_role_info)
|
|
||||||
* Cloud IAM ServiceAccount (gcp_iam_service_account, gcp_iam_service_account_info)
|
|
||||||
* Cloud IAM ServiceAccountKey (gcp_iam_service_account_key, gcp_iam_service_account_key_info)
|
|
||||||
* Cloud Key Management Service KeyRing (gcp_kms_key_ring, gcp_kms_key_ring_info)
|
|
||||||
* Cloud Key Management Service CryptoKey (gcp_kms_crypto_key, gcp_kms_crypto_key_info)
|
|
||||||
* Cloud (Stackdriver) Logging Metric (gcp_logging_metric, gcp_logging_metric_info)
|
|
||||||
* ML Engine Model (gcp_mlengine_model, gcp_mlengine_model_info)
|
|
||||||
* ML Engine Version (gcp_mlengine_version, gcp_mlengine_version_info)
|
|
||||||
* Cloud Pub/Sub Topic (gcp_pubsub_topic, gcp_pubsub_topic_info)
|
|
||||||
* Cloud Pub/Sub Subscription (gcp_pubsub_subscription, gcp_pubsub_subscription_info)
|
|
||||||
* Memorystore (Redis) Instance (gcp_redis_instance, gcp_redis_instance_info)
|
|
||||||
* Resource Manager Project (gcp_resourcemanager_project, gcp_resourcemanager_project_info)
|
|
||||||
* Runtime Configurator Config (gcp_runtimeconfig_config, gcp_runtimeconfig_config_info)
|
|
||||||
* Runtime Configurator Variable (gcp_runtimeconfig_variable, gcp_runtimeconfig_variable_info)
|
|
||||||
* Service Usage Service (gcp_serviceusage_service, gcp_serviceusage_service_info)
|
|
||||||
* Cloud Source Repositories Repository (gcp_sourcerepo_repository, gcp_sourcerepo_repository_info)
|
|
||||||
* Cloud Spanner Instance (gcp_spanner_instance, gcp_spanner_instance_info)
|
|
||||||
* Cloud Spanner Database (gcp_spanner_database, gcp_spanner_database_info)
|
|
||||||
* Cloud SQL Instance (gcp_sql_instance, gcp_sql_instance_info)
|
|
||||||
* Cloud SQL Database (gcp_sql_database, gcp_sql_database_info)
|
|
||||||
* Cloud SQL User (gcp_sql_user, gcp_sql_user_info)
|
|
||||||
* Cloud SQL SslCert (gcp_sql_ssl_cert, gcp_sql_ssl_cert_info)
|
|
||||||
* Cloud Storage Bucket (gcp_storage_bucket, gcp_storage_bucket_info)
|
|
||||||
* Cloud Storage BucketAccessControl (gcp_storage_bucket_access_control, gcp_storage_bucket_access_control_info)
|
|
||||||
* Cloud Storage DefaultObjectACL (gcp_storage_default_object_acl, gcp_storage_default_object_acl_info)
|
|
||||||
* Cloud TPU Node (gcp_tpu_node, gcp_tpu_node_info)
|
|
||||||
* Secret Manager (gcp_secret_manager)
|
|
||||||
|
|
|
@ -100,3 +100,63 @@ releases:
|
||||||
fragments:
|
fragments:
|
||||||
- release-1-4-1.yml
|
- release-1-4-1.yml
|
||||||
release_date: '2024-08-22'
|
release_date: '2024-08-22'
|
||||||
|
1.5.0:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- ansible - 2.17 is now the minimum version supported
|
||||||
|
- ansible - 3.11 is now the minimum Python version
|
||||||
|
- ansible-test - fixed sanity tests
|
||||||
|
- ansible-test - integration tests are now run against 2.17 and 2.18
|
||||||
|
- gcp_bigquery_table - properly handle BigQuery table clustering fields
|
||||||
|
- gcp_pubsub_subscription - fixed improper subscription uprade PATCH request
|
||||||
|
major_changes:
|
||||||
|
- google_cloud_ops_agents - role submodule removed because it prevents the collection
|
||||||
|
from passing sanity and lint tests
|
||||||
|
minor_changes:
|
||||||
|
- gcp_pubsub_subscription - allows to create GCS subscription
|
||||||
|
fragments:
|
||||||
|
- fix-bigquery-table-create-clustering.yml
|
||||||
|
- gcp_pubsub_subscription_bugfix.yaml
|
||||||
|
- gcp_pubsub_subscription_gcs_feature.yaml
|
||||||
|
- remove-google_cloud_ops_agents-role.yml
|
||||||
|
- upgrade_anisble.yml
|
||||||
|
release_date: '2025-01-14'
|
||||||
|
1.5.1:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- run integration test with Ansible 2.16 to match `requires_ansible` version
|
||||||
|
fragments:
|
||||||
|
- 667-include-2-16-in-ci.yml
|
||||||
|
release_date: '2025-01-30'
|
||||||
|
1.5.2:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- gcp_compute - fixed get_project_disks to process all responses (https://github.com/ansible-collections/google.cloud/pull/677).
|
||||||
|
fragments:
|
||||||
|
- 677-get-project-disks.yaml
|
||||||
|
release_date: '2025-04-18'
|
||||||
|
1.5.3:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- updated README to match required format (https://github.com/ansible-collections/google.cloud/pull/682).
|
||||||
|
fragments:
|
||||||
|
- 682-update-readme.yaml
|
||||||
|
release_date: '2025-04-30'
|
||||||
|
1.6.0:
|
||||||
|
changes:
|
||||||
|
bugfixes:
|
||||||
|
- gcp_secret_manager - cleaned up error responses (https://github.com/ansible-collections/google.cloud/pull/690).
|
||||||
|
- gcp_serviceusage_service - updated documentation (https://github.com/ansible-collections/google.cloud/pull/691).
|
||||||
|
minor_changes:
|
||||||
|
- gcp_compute - added GVNIC support to compute instance (https://github.com/ansible-collections/google.cloud/pull/688).
|
||||||
|
- gcp_compute - added ``discard_local_ssd`` flag to compute instance (https://github.com/ansible-collections/google.cloud/pull/686).
|
||||||
|
- gcp_compute - added hostname support to dynamic inventory (https://github.com/ansible-collections/google.cloud/pull/689).
|
||||||
|
- gcp_secret_manager - added support for regional secret manager (https://github.com/ansible-collections/google.cloud/pull/685).
|
||||||
|
fragments:
|
||||||
|
- 685-support-for-regional-secret-manager.yaml
|
||||||
|
- 686-add-discard_local_ssd-flag-to-compute-instance.yaml
|
||||||
|
- 688-add-gvnic-support.yaml
|
||||||
|
- 689-hostname-support-for-dynamic-inventory.yaml
|
||||||
|
- 690-clear-up-error-responses-from-gcp_secret_manager-lookup.yaml
|
||||||
|
- 691-updated-documentation-for-gcp_serviceusage_service.yaml
|
||||||
|
release_date: '2025-06-20'
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
bugfixes:
|
|
||||||
- gcp_bigquery_table - properly handle BigQuery table clustering fields
|
|
|
@ -1,2 +0,0 @@
|
||||||
bugfixes:
|
|
||||||
- gcp_pubsub_subscription - improper subscription uprade PATCH request
|
|
|
@ -1,2 +0,0 @@
|
||||||
features:
|
|
||||||
- gcp_pubsub_subscription - allows to create GCS subscription
|
|
8
codecov.yml
Normal file
8
codecov.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
informational: true
|
|
@ -10,7 +10,7 @@ namespace: google
|
||||||
name: cloud
|
name: cloud
|
||||||
|
|
||||||
# The version of the collection. Must be compatible with semantic versioning
|
# The version of the collection. Must be compatible with semantic versioning
|
||||||
version: 1.4.1
|
version: 1.6.0
|
||||||
|
|
||||||
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
||||||
readme: README.md
|
readme: README.md
|
||||||
|
@ -33,7 +33,7 @@ license:
|
||||||
|
|
||||||
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
|
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
|
||||||
# mutually exclusive with 'license'
|
# mutually exclusive with 'license'
|
||||||
#license_file: ''
|
# license_file: ''
|
||||||
|
|
||||||
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
|
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
|
||||||
# requirements as 'namespace' and 'name'
|
# requirements as 'namespace' and 'name'
|
||||||
|
@ -48,13 +48,13 @@ tags:
|
||||||
# collection label 'namespace.name'. The value is a version range
|
# collection label 'namespace.name'. The value is a version range
|
||||||
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
|
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
|
||||||
# range specifiers can be set and are separated by ','
|
# range specifiers can be set and are separated by ','
|
||||||
#dependencies: {}
|
# dependencies: {}
|
||||||
|
|
||||||
# The URL of the originating SCM repository
|
# The URL of the originating SCM repository
|
||||||
repository: https://github.com/ansible-collections/google.cloud
|
repository: https://github.com/ansible-collections/google.cloud
|
||||||
|
|
||||||
# The URL to any online docs
|
# The URL to any online docs
|
||||||
#documentation: http://docs.example.com
|
# documentation: http://docs.example.com
|
||||||
|
|
||||||
# The URL to the homepage of the collection/project
|
# The URL to the homepage of the collection/project
|
||||||
homepage: http://cloud.google.com
|
homepage: http://cloud.google.com
|
||||||
|
|
|
@ -46,7 +46,7 @@ RUN yum -y install python-pip
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Install of Python3 #}
|
{# Install of Python3 #}
|
||||||
{% if item.image in ["ubuntu:18.04", "ubuntu:20.04", "debian:10"] %}
|
{% if item.image in ["ubuntu:18.04", "ubuntu:20.04", "ubuntu:24.04", "debian:10", "debian:11", "debian:12"] %}
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
apt-utils python3-setuptools python3-pip
|
apt-utils python3-setuptools python3-pip
|
||||||
|
@ -99,13 +99,13 @@ RUN locale-gen en_US.UTF-8
|
||||||
RUN mkdir -p /etc/ansible
|
RUN mkdir -p /etc/ansible
|
||||||
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||||
|
|
||||||
{% if item.image in ["centos:7", "centos:8", "debian:9", "debian:10"] %}
|
{% if item.image in ["centos:7", "centos:8", "debian:9", "debian:10", "debian:11", "debian:12"] %}
|
||||||
VOLUME ["/sys/fs/cgroup"]
|
VOLUME ["/sys/fs/cgroup"]
|
||||||
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04"] %}
|
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:24.04"] %}
|
||||||
VOLUME ["/sys/fs/cgroup", "/tmp", "/run"]
|
VOLUME ["/sys/fs/cgroup", "/tmp", "/run"]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.image in ["centos:7", "centos:8"] %}
|
{% if item.image in ["centos:7", "centos:8"] %}
|
||||||
CMD ["/usr/sbin/init"]
|
CMD ["/usr/sbin/init"]
|
||||||
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "debian:9", "debian:10"] %}
|
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:24.04", "debian:9", "debian:10", "debian:11", "debian:12"] %}
|
||||||
CMD ["/lib/systemd/systemd"]
|
CMD ["/lib/systemd/systemd"]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -9,13 +9,13 @@ lint: |
|
||||||
ansible-lint
|
ansible-lint
|
||||||
platforms:
|
platforms:
|
||||||
- name: instance
|
- name: instance
|
||||||
image: ubuntu:20.04
|
image: ubuntu:24.04
|
||||||
privileged: true
|
privileged: true
|
||||||
ansible.builtin.command: /lib/systemd/systemd
|
ansible.builtin.command: /lib/systemd/systemd
|
||||||
volumes:
|
volumes:
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
- name: instance
|
- name: instance
|
||||||
image: debian:10
|
image: debian:12
|
||||||
privileged: true
|
privileged: true
|
||||||
ansible.builtin.command: /lib/systemd/systemd
|
ansible.builtin.command: /lib/systemd/systemd
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -46,7 +46,7 @@ RUN yum -y install python-pip
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Install of Python3 #}
|
{# Install of Python3 #}
|
||||||
{% if item.image in ["ubuntu:18.04", "ubuntu:20.04", "debian:10"] %}
|
{% if item.image in ["ubuntu:18.04", "ubuntu:20.04", "ubuntu:24.04", "debian:10", "debian:11", "debian:12"] %}
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
apt-utils python3-setuptools python3-pip
|
apt-utils python3-setuptools python3-pip
|
||||||
|
@ -99,13 +99,13 @@ RUN locale-gen en_US.UTF-8
|
||||||
RUN mkdir -p /etc/ansible
|
RUN mkdir -p /etc/ansible
|
||||||
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||||
|
|
||||||
{% if item.image in ["centos:7", "centos:8", "debian:9", "debian:10"] %}
|
{% if item.image in ["centos:7", "centos:8", "debian:9", "debian:10", "debian:11", "debian:12"] %}
|
||||||
VOLUME ["/sys/fs/cgroup"]
|
VOLUME ["/sys/fs/cgroup"]
|
||||||
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04"] %}
|
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:24.04"] %}
|
||||||
VOLUME ["/sys/fs/cgroup", "/tmp", "/run"]
|
VOLUME ["/sys/fs/cgroup", "/tmp", "/run"]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.image in ["centos:7", "centos:8"] %}
|
{% if item.image in ["centos:7", "centos:8"] %}
|
||||||
CMD ["/usr/sbin/init"]
|
CMD ["/usr/sbin/init"]
|
||||||
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "debian:9", "debian:10"] %}
|
{% elif item.image in ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:24.04", "debian:9", "debian:10", "debian:11", "debian:12"] %}
|
||||||
CMD ["/lib/systemd/systemd"]
|
CMD ["/lib/systemd/systemd"]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -9,13 +9,13 @@ lint: |
|
||||||
ansible-lint
|
ansible-lint
|
||||||
platforms:
|
platforms:
|
||||||
- name: instance
|
- name: instance
|
||||||
image: ubuntu:20.04
|
image: ubuntu:24.04
|
||||||
privileged: true
|
privileged: true
|
||||||
ansible.builtin.command: /lib/systemd/systemd
|
ansible.builtin.command: /lib/systemd/systemd
|
||||||
volumes:
|
volumes:
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
- name: instance
|
- name: instance
|
||||||
image: debian:10
|
image: debian:12
|
||||||
privileged: true
|
privileged: true
|
||||||
ansible.builtin.command: /lib/systemd/systemd
|
ansible.builtin.command: /lib/systemd/systemd
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -7,7 +7,6 @@ __metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = """
|
||||||
name: gcp_compute
|
name: gcp_compute
|
||||||
plugin_type: inventory
|
|
||||||
short_description: Google Cloud Compute Engine inventory source
|
short_description: Google Cloud Compute Engine inventory source
|
||||||
requirements:
|
requirements:
|
||||||
- requests >= 2.18.4
|
- requests >= 2.18.4
|
||||||
|
@ -24,17 +23,20 @@ DOCUMENTATION = """
|
||||||
required: True
|
required: True
|
||||||
choices: ['google.cloud.gcp_compute', 'gcp_compute']
|
choices: ['google.cloud.gcp_compute', 'gcp_compute']
|
||||||
zones:
|
zones:
|
||||||
description: A list of regions in which to describe GCE instances.
|
description: A list of zones in which to describe GCE instances.
|
||||||
If none provided, it defaults to all zones available to a given project.
|
If none provided, it defaults to all zones available to a given project.
|
||||||
type: list
|
type: list
|
||||||
|
elements: string
|
||||||
folders:
|
folders:
|
||||||
description: A folder that contains many projects
|
description: A folder that contains many projects
|
||||||
type: list
|
type: list
|
||||||
required: False
|
required: False
|
||||||
|
elements: string
|
||||||
projects:
|
projects:
|
||||||
description: A list of projects in which to describe GCE instances.
|
description: A list of projects in which to describe GCE instances.
|
||||||
type: list
|
type: list
|
||||||
required: False
|
required: False
|
||||||
|
elements: string
|
||||||
filters:
|
filters:
|
||||||
description: >
|
description: >
|
||||||
A list of filter value pairs. Available filters are listed here
|
A list of filter value pairs. Available filters are listed here
|
||||||
|
@ -42,12 +44,14 @@ DOCUMENTATION = """
|
||||||
Each additional filter in the list will be added as an AND condition
|
Each additional filter in the list will be added as an AND condition
|
||||||
(filter1 and filter2)
|
(filter1 and filter2)
|
||||||
type: list
|
type: list
|
||||||
|
elements: string
|
||||||
hostnames:
|
hostnames:
|
||||||
description: A list of options that describe the ordering for which
|
description: A list of options that describe the ordering for which
|
||||||
hostnames should be assigned. Currently supported hostnames are
|
hostnames should be assigned. Currently supported hostnames are
|
||||||
'public_ip', 'private_ip', 'name' or 'labels.vm_name'.
|
'public_ip', 'private_ip', 'name', 'hostname' or 'labels.vm_name'.
|
||||||
default: ['public_ip', 'private_ip', 'name']
|
default: ['public_ip', 'private_ip', 'name']
|
||||||
type: list
|
type: list
|
||||||
|
elements: string
|
||||||
name_suffix:
|
name_suffix:
|
||||||
description: Custom domain suffix. If set, this string will be appended to all hosts.
|
description: Custom domain suffix. If set, this string will be appended to all hosts.
|
||||||
default: ""
|
default: ""
|
||||||
|
@ -63,6 +67,7 @@ DOCUMENTATION = """
|
||||||
scopes:
|
scopes:
|
||||||
description: list of authentication scopes
|
description: list of authentication scopes
|
||||||
type: list
|
type: list
|
||||||
|
elements: string
|
||||||
default: ['https://www.googleapis.com/auth/compute']
|
default: ['https://www.googleapis.com/auth/compute']
|
||||||
env:
|
env:
|
||||||
- name: GCP_SCOPES
|
- name: GCP_SCOPES
|
||||||
|
@ -116,7 +121,7 @@ DOCUMENTATION = """
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
plugin: google.cloud.gcp_compute
|
plugin: google.cloud.gcp_compute
|
||||||
zones: # populate inventory with instances in these regions
|
zones: # populate inventory with instances in these zones
|
||||||
- us-east1-a
|
- us-east1-a
|
||||||
projects:
|
projects:
|
||||||
- gcp-prod-gke-100
|
- gcp-prod-gke-100
|
||||||
|
@ -243,6 +248,8 @@ class GcpInstance(object):
|
||||||
name = self._get_publicip()
|
name = self._get_publicip()
|
||||||
elif order == "private_ip":
|
elif order == "private_ip":
|
||||||
name = self._get_privateip()
|
name = self._get_privateip()
|
||||||
|
elif order == "hostname":
|
||||||
|
name = self.json.get("hostname", self.json["name"] + self.name_suffix)
|
||||||
elif order == "name":
|
elif order == "name":
|
||||||
name = self.json["name"] + self.name_suffix
|
name = self.json["name"] + self.name_suffix
|
||||||
else:
|
else:
|
||||||
|
|
315
plugins/lookup/gcp_parameter_manager.py
Normal file
315
plugins/lookup/gcp_parameter_manager.py
Normal file
|
@ -0,0 +1,315 @@
|
||||||
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
DOCUMENTATION = '''
|
||||||
|
name: gcp_parameter_manager
|
||||||
|
author: Google Inc. (@googlecloudplatform)
|
||||||
|
|
||||||
|
short_description: Get Parameters from Google Cloud as a Lookup plugin
|
||||||
|
description:
|
||||||
|
- retrieve parameter keys in parameter Manager for use in playbooks
|
||||||
|
- see https://cloud.google.com/iam/docs/service-account-creds for details on creating
|
||||||
|
credentials for Google Cloud and the format of such credentials
|
||||||
|
- once a parameter value is retreived, it is returned decoded. It is up to the developer
|
||||||
|
to maintain secrecy of this value once returned.
|
||||||
|
- if location option is defined, then it deals with the regional parameters of the
|
||||||
|
location
|
||||||
|
|
||||||
|
options:
|
||||||
|
key:
|
||||||
|
description:
|
||||||
|
- the name of the parameter to look up in parameter Manager
|
||||||
|
type: str
|
||||||
|
required: True
|
||||||
|
aliases:
|
||||||
|
- name
|
||||||
|
- parameter
|
||||||
|
- parameter_id
|
||||||
|
project:
|
||||||
|
description:
|
||||||
|
- The name of the google cloud project
|
||||||
|
- defaults to OS env variable GCP_PROJECT if not present
|
||||||
|
type: str
|
||||||
|
location:
|
||||||
|
description:
|
||||||
|
- If provided, it defines the location of the regional parameter.
|
||||||
|
type: str
|
||||||
|
render_secret:
|
||||||
|
description:
|
||||||
|
- support for rendering secrets
|
||||||
|
- defaults to false if not present
|
||||||
|
type: bool
|
||||||
|
auth_kind:
|
||||||
|
description:
|
||||||
|
- the type of authentication to use with Google Cloud (i.e. serviceaccount or machineaccount)
|
||||||
|
- defaults to OS env variable GCP_AUTH_KIND if not present
|
||||||
|
type: str
|
||||||
|
version:
|
||||||
|
description:
|
||||||
|
- the version name of your parameter to retrieve
|
||||||
|
type: str
|
||||||
|
required: False
|
||||||
|
service_account_email:
|
||||||
|
description:
|
||||||
|
- email associated with the service account
|
||||||
|
- defaults to OS env variable GCP_SERVICE_ACCOUNT_EMAIL if not present
|
||||||
|
type: str
|
||||||
|
required: False
|
||||||
|
service_account_file:
|
||||||
|
description:
|
||||||
|
- JSON Credential file obtained from Google Cloud
|
||||||
|
- defaults to OS env variable GCP_SERVICE_ACCOUNT_FILE if not present
|
||||||
|
- see https://cloud.google.com/iam/docs/service-account-creds for details
|
||||||
|
type: str
|
||||||
|
required: False
|
||||||
|
service_account_info:
|
||||||
|
description:
|
||||||
|
- JSON Object representing the contents of a service_account_file obtained from Google Cloud
|
||||||
|
- defaults to OS env variable GCP_SERVICE_ACCOUNT_INFO if not present
|
||||||
|
type: dict
|
||||||
|
required: False
|
||||||
|
access_token:
|
||||||
|
description:
|
||||||
|
- support for GCP Access Token
|
||||||
|
- defaults to OS env variable GCP_ACCESS_TOKEN if not present
|
||||||
|
type: str
|
||||||
|
required: False
|
||||||
|
on_error:
|
||||||
|
description:
|
||||||
|
- how to handle errors
|
||||||
|
- strict means raise an exception
|
||||||
|
- warn means warn, and return none
|
||||||
|
- ignore means just return none
|
||||||
|
type: str
|
||||||
|
required: False
|
||||||
|
choices:
|
||||||
|
- 'strict'
|
||||||
|
- 'warn'
|
||||||
|
- 'ignore'
|
||||||
|
default: 'strict'
|
||||||
|
scopes:
|
||||||
|
description:
|
||||||
|
- Authenticaiton scopes for Google parameter Manager
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
|
default: ["https://www.googleapis.com/auth/cloud-platform"]
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
EXAMPLES = '''
|
||||||
|
- name: Test parameter using env variables for credentials
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', version='test_version') }}"
|
||||||
|
|
||||||
|
- name: Test parameter using explicit credentials
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', version='test_version', project='project', auth_kind='serviceaccount',
|
||||||
|
service_account_file='file.json') }}"
|
||||||
|
|
||||||
|
- name: Test getting specific version of a parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', version='test-version') }}"
|
||||||
|
|
||||||
|
- name: Test getting latest version of a parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key') }}"
|
||||||
|
|
||||||
|
- name: Test render specific version of a parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', version='test-version', render_secret=True) }}"
|
||||||
|
|
||||||
|
- name: Test render latest version of a parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', render_secret=True) }}"
|
||||||
|
|
||||||
|
- name: Test regional parameter using env variables for credentials
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', location='us-central1', version='test_version') }}"
|
||||||
|
|
||||||
|
- name: Test regional parameter using explicit credentials
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', location='us-central1', version='test_version', project='project',
|
||||||
|
auth_kind='serviceaccount', service_account_file='file.json') }}"
|
||||||
|
|
||||||
|
- name: Test getting specific version of a regional parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', location='us-central1', version='test_version') }}"
|
||||||
|
|
||||||
|
- name: Test getting latest version of a regional parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', location='us-central1') }}"
|
||||||
|
|
||||||
|
- name: Test render specific version of a regional parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', location='us-central1', version='test_version', render_secret=True) }}"
|
||||||
|
|
||||||
|
- name: Test render latest version of a regional parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_parameter_manager', key='parameter_key', location='us-central1', render_secret=True) }}"
|
||||||
|
'''
|
||||||
|
|
||||||
|
RETURN = '''
|
||||||
|
_raw:
|
||||||
|
description: the contents of the parameter requested (please use "no_log" to not expose this parameter)
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Imports
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
import os
|
||||||
|
import base64
|
||||||
|
|
||||||
|
from ansible.plugins.lookup import LookupBase
|
||||||
|
from ansible.errors import AnsibleError
|
||||||
|
from ansible.utils.display import Display
|
||||||
|
|
||||||
|
try:
|
||||||
|
import requests
|
||||||
|
HAS_REQUESTS = True
|
||||||
|
except ImportError:
|
||||||
|
HAS_REQUESTS = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
|
||||||
|
GcpSession,
|
||||||
|
)
|
||||||
|
HAS_GOOGLE_CLOUD_COLLECTION = True
|
||||||
|
except ImportError:
|
||||||
|
HAS_GOOGLE_CLOUD_COLLECTION = False
|
||||||
|
|
||||||
|
|
||||||
|
class GcpLookupException(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class GcpMockModule(object):
|
||||||
|
def __init__(self, params):
|
||||||
|
self.params = params
|
||||||
|
|
||||||
|
def fail_json(self, *args, **kwargs):
|
||||||
|
raise AnsibleError(kwargs["msg"])
|
||||||
|
|
||||||
|
def raise_for_status(self, response):
|
||||||
|
try:
|
||||||
|
response.raise_for_status()
|
||||||
|
except getattr(requests.exceptions, "RequestException"):
|
||||||
|
self.fail_json(msg="GCP returned error: %s" % response.json())
|
||||||
|
|
||||||
|
|
||||||
|
class LookupModule(LookupBase):
|
||||||
|
def run(self, terms=None, variables=None, **kwargs):
|
||||||
|
self._display = Display()
|
||||||
|
if not HAS_GOOGLE_CLOUD_COLLECTION:
|
||||||
|
raise AnsibleError(
|
||||||
|
"""gcp_parameter lookup needs a supported version of the google.cloud
|
||||||
|
collection installed. Use `ansible-galaxy collection install google.cloud`
|
||||||
|
to install it"""
|
||||||
|
)
|
||||||
|
self.set_options(var_options=variables, direct=kwargs)
|
||||||
|
params = {
|
||||||
|
"key": self.get_option("key"),
|
||||||
|
"location": self.get_option("location"),
|
||||||
|
"version": self.get_option("version"),
|
||||||
|
"access_token": self.get_option("access_token"),
|
||||||
|
"scopes": self.get_option("scopes"),
|
||||||
|
"render_secret": self.get_option("render_secret"),
|
||||||
|
"on_error": self.get_option("on_error")
|
||||||
|
}
|
||||||
|
|
||||||
|
params['name'] = params['key']
|
||||||
|
|
||||||
|
# support GCP_* env variables for some parameters
|
||||||
|
for param in ["project", "auth_kind", "service_account_file", "service_account_info", "service_account_email", "access_token"]:
|
||||||
|
params[param] = self.fallback_from_env(param)
|
||||||
|
|
||||||
|
self._display.vvv(msg=f"Module Parameters: {params}")
|
||||||
|
fake_module = GcpMockModule(params)
|
||||||
|
result = self.get_parameter(fake_module)
|
||||||
|
return [base64.b64decode(result)]
|
||||||
|
|
||||||
|
def fallback_from_env(self, arg):
|
||||||
|
if self.get_option(arg):
|
||||||
|
return self.get_option(arg)
|
||||||
|
else:
|
||||||
|
env_name = f"GCP_{arg.upper()}"
|
||||||
|
if env_name in os.environ:
|
||||||
|
self.set_option(arg, os.environ[env_name])
|
||||||
|
return self.get_option(arg)
|
||||||
|
|
||||||
|
def raise_error(self, module, msg):
|
||||||
|
if module.params.get('on_error') == 'strict':
|
||||||
|
raise GcpLookupException(msg)
|
||||||
|
elif module.params.get('on_error') == 'warn':
|
||||||
|
self._display.warning(msg)
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def get_latest_version(self, module, auth):
|
||||||
|
url = (self.make_url_prefix(module) + "parameters/{name}/versions?orderBy=create_time desc&filter=disabled=false").format(
|
||||||
|
**module.params
|
||||||
|
)
|
||||||
|
response = auth.get(url)
|
||||||
|
self._display.vvv(msg=f"List Version Response: {response.status_code} for {response.request.url}: {response.json()}")
|
||||||
|
if response.status_code != 200:
|
||||||
|
self.raise_error(module, f"unable to list versions of parameter {response.status_code}")
|
||||||
|
version_list = response.json()
|
||||||
|
if "parameterVersions" in version_list and len(version_list["parameterVersions"]) > 0:
|
||||||
|
# Extract name from the first index
|
||||||
|
version_name = version_list["parameterVersions"][0]["name"]
|
||||||
|
return version_name.split('/')[-1]
|
||||||
|
else:
|
||||||
|
self.raise_error(module, f"unable to list parameter versions via {response.request.url}: {response.json()}")
|
||||||
|
|
||||||
|
def get_parameter(self, module):
|
||||||
|
auth = GcpSession(module, "parametermanager")
|
||||||
|
|
||||||
|
if module.params.get('project') is None:
|
||||||
|
self.raise_error(module, "The project is required. Please specify the Google Cloud project to use.")
|
||||||
|
|
||||||
|
if module.params.get('version') == 'latest' or module.params.get('version') is None:
|
||||||
|
module.params['version'] = self.get_latest_version(module, auth)
|
||||||
|
|
||||||
|
if module.params.get('render_secret') is None:
|
||||||
|
module.params['render_secret'] = False
|
||||||
|
|
||||||
|
# there was an error listing parameter versions
|
||||||
|
if module.params.get('version') is None:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
if module.params.get('render_secret') is not None:
|
||||||
|
url = (self.make_url_prefix(module) + "parameters/{name}/versions/{version}:render").format(
|
||||||
|
**module.params
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
url = (self.make_url_prefix(module) + "parameters/{name}/versions/{version}").format(
|
||||||
|
**module.params
|
||||||
|
)
|
||||||
|
response = auth.get(url)
|
||||||
|
self._display.vvv(msg=f"Response: {response.status_code} for {response.request.url}: {response.json()}")
|
||||||
|
if response.status_code != 200:
|
||||||
|
self.raise_error(module, f"Failed to lookup parameter value via {response.request.url} {response.status_code}")
|
||||||
|
return ''
|
||||||
|
|
||||||
|
response_json = response.json()
|
||||||
|
if module.params.get('render_secret') is not None:
|
||||||
|
if 'renderedPayload' not in response_json:
|
||||||
|
self.raise_error(module, "The parameter version is disabled or the response does not contain the 'renderedPayload' field.")
|
||||||
|
return ''
|
||||||
|
return response_json['renderedPayload']
|
||||||
|
else:
|
||||||
|
if 'payload' not in response_json or 'data' not in response_json['payload']:
|
||||||
|
self.raise_error(module, "The parameter version is disabled or the response does not contain the 'data' field.")
|
||||||
|
return ''
|
||||||
|
return response_json['payload']['data']
|
||||||
|
|
||||||
|
def make_url_prefix(self, module):
|
||||||
|
if module.params.get('location') and module.params.get('location') != 'global':
|
||||||
|
return "https://parametermanager.{location}.rep.googleapis.com/v1/projects/{project}/locations/{location}/"
|
||||||
|
return "https://parametermanager.googleapis.com/v1/projects/{project}/locations/global/"
|
|
@ -5,8 +5,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
author:
|
author: Google Inc. (@googlecloudplatform)
|
||||||
- Dave Costakos <dcostako@redhat.com>
|
|
||||||
name: gcp_secret_manager
|
name: gcp_secret_manager
|
||||||
short_description: Get Secrets from Google Cloud as a Lookup plugin
|
short_description: Get Secrets from Google Cloud as a Lookup plugin
|
||||||
description:
|
description:
|
||||||
|
@ -15,6 +14,8 @@ DOCUMENTATION = '''
|
||||||
credentials for Google Cloud and the format of such credentials
|
credentials for Google Cloud and the format of such credentials
|
||||||
- once a secret value is retreived, it is returned decoded. It is up to the developer
|
- once a secret value is retreived, it is returned decoded. It is up to the developer
|
||||||
to maintain secrecy of this value once returned.
|
to maintain secrecy of this value once returned.
|
||||||
|
- if location option is defined, then it deals with the regional secrets of the
|
||||||
|
location
|
||||||
|
|
||||||
options:
|
options:
|
||||||
key:
|
key:
|
||||||
|
@ -31,6 +32,10 @@ DOCUMENTATION = '''
|
||||||
- The name of the google cloud project
|
- The name of the google cloud project
|
||||||
- defaults to OS env variable GCP_PROJECT if not present
|
- defaults to OS env variable GCP_PROJECT if not present
|
||||||
type: str
|
type: str
|
||||||
|
location:
|
||||||
|
description:
|
||||||
|
- If provided, it defines the location of the regional secret.
|
||||||
|
type: str
|
||||||
auth_kind:
|
auth_kind:
|
||||||
description:
|
description:
|
||||||
- the type of authentication to use with Google Cloud (i.e. serviceaccount or machineaccount)
|
- the type of authentication to use with Google Cloud (i.e. serviceaccount or machineaccount)
|
||||||
|
@ -59,7 +64,7 @@ DOCUMENTATION = '''
|
||||||
description:
|
description:
|
||||||
- JSON Object representing the contents of a service_account_file obtained from Google Cloud
|
- JSON Object representing the contents of a service_account_file obtained from Google Cloud
|
||||||
- defaults to OS env variable GCP_SERVICE_ACCOUNT_INFO if not present
|
- defaults to OS env variable GCP_SERVICE_ACCOUNT_INFO if not present
|
||||||
type: jsonarg
|
type: str
|
||||||
required: False
|
required: False
|
||||||
access_token:
|
access_token:
|
||||||
description:
|
description:
|
||||||
|
@ -84,6 +89,7 @@ DOCUMENTATION = '''
|
||||||
description:
|
description:
|
||||||
- Authenticaiton scopes for Google Secret Manager
|
- Authenticaiton scopes for Google Secret Manager
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
default: ["https://www.googleapis.com/auth/cloud-platform"]
|
default: ["https://www.googleapis.com/auth/cloud-platform"]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -103,6 +109,23 @@ EXAMPLES = '''
|
||||||
- name: Test getting specific version of a secret (new version)
|
- name: Test getting specific version of a secret (new version)
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ lookup('google.cloud.gcp_secret_manager', key='secret_key', version='2') }}"
|
msg: "{{ lookup('google.cloud.gcp_secret_manager', key='secret_key', version='2') }}"
|
||||||
|
|
||||||
|
- name: Test regional secret using env variables for credentials
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_secret_manager', key='secret_key', location='us-central1') }}"
|
||||||
|
|
||||||
|
- name: Test regional secret using explicit credentials
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_secret_manager', key='secret_key', location='us-central1', project='project', auth_kind='serviceaccount',
|
||||||
|
service_account_file='file.json') }}"
|
||||||
|
|
||||||
|
- name: Test getting specific version of a regional secret (old version)
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_secret_manager', key='secret_key', location='us-central1', version='1') }}"
|
||||||
|
|
||||||
|
- name: Test getting specific version of a regional secret (new version)
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('google.cloud.gcp_secret_manager', key='secret_key', location='us-central1', version='2') }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -168,6 +191,7 @@ class LookupModule(LookupBase):
|
||||||
self.set_options(var_options=variables, direct=kwargs)
|
self.set_options(var_options=variables, direct=kwargs)
|
||||||
params = {
|
params = {
|
||||||
"key": self.get_option("key"),
|
"key": self.get_option("key"),
|
||||||
|
"location": self.get_option("location"),
|
||||||
"version": self.get_option("version"),
|
"version": self.get_option("version"),
|
||||||
"access_token": self.get_option("access_token"),
|
"access_token": self.get_option("access_token"),
|
||||||
"scopes": self.get_option("scopes"),
|
"scopes": self.get_option("scopes"),
|
||||||
|
@ -199,13 +223,28 @@ class LookupModule(LookupBase):
|
||||||
# to be set if secret versions get disabled
|
# to be set if secret versions get disabled
|
||||||
# see https://issuetracker.google.com/issues/286489671
|
# see https://issuetracker.google.com/issues/286489671
|
||||||
def get_latest_version(self, module, auth):
|
def get_latest_version(self, module, auth):
|
||||||
url = "https://secretmanager.googleapis.com/v1/projects/{project}/secrets/{name}/versions?filter=state:ENABLED".format(
|
url = (self.make_url_prefix(module) + "secrets/{name}/versions?filter=state:ENABLED").format(
|
||||||
**module.params
|
**module.params
|
||||||
)
|
)
|
||||||
response = auth.get(url)
|
response = auth.get(url)
|
||||||
self._display.vvv(msg=f"List Version Response: {response.status_code} for {response.request.url}: {response.json()}")
|
self._display.vvv(msg=f"List Version Response: {response.status_code} for {response.request.url}: {response.json()}")
|
||||||
if response.status_code != 200:
|
if response.status_code >= 500: # generic server error
|
||||||
self.raise_error(module, f"unable to list versions of secret {response.status_code}")
|
self.raise_error(
|
||||||
|
module,
|
||||||
|
f"server error encountered while looking for secret '{module.params['name']}', code: {response.status_code}"
|
||||||
|
)
|
||||||
|
elif response.status_code >= 400: # generic client request error
|
||||||
|
self.raise_error(
|
||||||
|
module,
|
||||||
|
f"client error encountered while looking for secret '{module.params['name']}', code: {response.status_code}"
|
||||||
|
)
|
||||||
|
elif response.status_code >= 300: # all other possible errors
|
||||||
|
self.raise_error(
|
||||||
|
module,
|
||||||
|
f"unable to list versions for secret '{module.params['name']}', code: {response.status_code}"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
version_list = response.json()
|
version_list = response.json()
|
||||||
if "versions" in version_list:
|
if "versions" in version_list:
|
||||||
versions_numbers = []
|
versions_numbers = []
|
||||||
|
@ -234,7 +273,7 @@ class LookupModule(LookupBase):
|
||||||
if module.params['calc_version'] is None:
|
if module.params['calc_version'] is None:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
url = "https://secretmanager.googleapis.com/v1/projects/{project}/secrets/{name}/versions/{calc_version}:access".format(
|
url = (self.make_url_prefix(module) + "secrets/{name}/versions/{calc_version}:access").format(
|
||||||
**module.params
|
**module.params
|
||||||
)
|
)
|
||||||
response = auth.get(url)
|
response = auth.get(url)
|
||||||
|
@ -244,3 +283,8 @@ class LookupModule(LookupBase):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
return response.json()['payload']['data']
|
return response.json()['payload']['data']
|
||||||
|
|
||||||
|
def make_url_prefix(self, module):
|
||||||
|
if module.params['location']:
|
||||||
|
return "https://secretmanager.{location}.rep.googleapis.com/v1/projects/{project}/locations/{location}/"
|
||||||
|
return "https://secretmanager.googleapis.com/v1/projects/{project}/"
|
||||||
|
|
|
@ -150,7 +150,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict())
|
module = GcpModule(argument_spec=dict(), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -311,7 +311,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict())
|
module = GcpModule(argument_spec=dict(), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/bigquery']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/bigquery']
|
||||||
|
|
|
@ -253,6 +253,7 @@ options:
|
||||||
data .
|
data .
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
|
default: 0
|
||||||
source_format:
|
source_format:
|
||||||
description:
|
description:
|
||||||
- The data format.
|
- The data format.
|
||||||
|
@ -328,6 +329,7 @@ options:
|
||||||
when reading the data.
|
when reading the data.
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
|
default: 0
|
||||||
csv_options:
|
csv_options:
|
||||||
description:
|
description:
|
||||||
- Additional properties to set if sourceFormat is set to CSV.
|
- Additional properties to set if sourceFormat is set to CSV.
|
||||||
|
@ -368,6 +370,7 @@ options:
|
||||||
when reading the data.
|
when reading the data.
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
|
default: 0
|
||||||
bigtable_options:
|
bigtable_options:
|
||||||
description:
|
description:
|
||||||
- Additional options if sourceFormat is set to BIGTABLE.
|
- Additional options if sourceFormat is set to BIGTABLE.
|
||||||
|
|
|
@ -590,7 +590,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(dataset=dict(type='str')))
|
module = GcpModule(argument_spec=dict(dataset=dict(type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/bigquery']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/bigquery']
|
||||||
|
|
|
@ -188,7 +188,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict())
|
module = GcpModule(argument_spec=dict(), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -1536,7 +1536,7 @@ def main():
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
pubsub_config=dict(type='dict', options=dict(topic=dict(required=True, type='str'), service_account_email=dict(type='str'))),
|
pubsub_config=dict(type='dict', options=dict(topic=dict(required=True, type='str'), service_account_email=dict(type='str'))),
|
||||||
webhook_config=dict(type='dict', options=dict(secret=dict(required=True, type='str'))),
|
webhook_config=dict(type='dict', options=dict(secret=dict(required=True, type='str', no_log=True))),
|
||||||
build=dict(
|
build=dict(
|
||||||
type='dict',
|
type='dict',
|
||||||
options=dict(
|
options=dict(
|
||||||
|
@ -1568,7 +1568,11 @@ def main():
|
||||||
queue_ttl=dict(type='str'),
|
queue_ttl=dict(type='str'),
|
||||||
logs_bucket=dict(type='str'),
|
logs_bucket=dict(type='str'),
|
||||||
timeout=dict(default='600s', type='str'),
|
timeout=dict(default='600s', type='str'),
|
||||||
secrets=dict(type='list', elements='dict', options=dict(kms_key_name=dict(required=True, type='str'), secret_env=dict(type='dict'))),
|
secrets=dict(
|
||||||
|
type='list',
|
||||||
|
elements='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(kms_key_name=dict(required=True, type='str'), secret_env=dict(type='dict', no_log=True))),
|
||||||
steps=dict(
|
steps=dict(
|
||||||
required=True,
|
required=True,
|
||||||
type='list',
|
type='list',
|
||||||
|
@ -1580,7 +1584,7 @@ def main():
|
||||||
id=dict(type='str'),
|
id=dict(type='str'),
|
||||||
entrypoint=dict(type='str'),
|
entrypoint=dict(type='str'),
|
||||||
dir=dict(type='str'),
|
dir=dict(type='str'),
|
||||||
secret_env=dict(type='list', elements='str'),
|
secret_env=dict(type='list', elements='str', no_log=True),
|
||||||
timeout=dict(type='str'),
|
timeout=dict(type='str'),
|
||||||
timing=dict(type='str'),
|
timing=dict(type='str'),
|
||||||
volumes=dict(
|
volumes=dict(
|
||||||
|
@ -1609,7 +1613,7 @@ def main():
|
||||||
worker_pool=dict(type='str'),
|
worker_pool=dict(type='str'),
|
||||||
logging=dict(type='str'),
|
logging=dict(type='str'),
|
||||||
env=dict(type='list', elements='str'),
|
env=dict(type='list', elements='str'),
|
||||||
secret_env=dict(type='list', elements='str'),
|
secret_env=dict(type='list', elements='str', no_log=True),
|
||||||
volumes=dict(type='list', elements='dict', options=dict(name=dict(type='str'), path=dict(type='str'))),
|
volumes=dict(type='list', elements='dict', options=dict(name=dict(type='str'), path=dict(type='str'))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -814,7 +814,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict())
|
module = GcpModule(argument_spec=dict(), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -273,7 +273,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -681,8 +681,8 @@ def main():
|
||||||
http_method=dict(type='str'),
|
http_method=dict(type='str'),
|
||||||
body=dict(type='str'),
|
body=dict(type='str'),
|
||||||
headers=dict(type='dict'),
|
headers=dict(type='dict'),
|
||||||
oauth_token=dict(type='dict', options=dict(service_account_email=dict(required=True, type='str'), scope=dict(type='str'))),
|
oauth_token=dict(type='dict', no_log=True, options=dict(service_account_email=dict(required=True, type='str'), scope=dict(type='str'))),
|
||||||
oidc_token=dict(type='dict', options=dict(service_account_email=dict(required=True, type='str'), audience=dict(type='str'))),
|
oidc_token=dict(type='dict', no_log=True, options=dict(service_account_email=dict(required=True, type='str'), audience=dict(type='str'))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
region=dict(required=True, type='str'),
|
region=dict(required=True, type='str'),
|
||||||
|
|
|
@ -379,7 +379,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -279,7 +279,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -235,7 +235,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -320,7 +320,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -252,7 +252,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -88,7 +88,7 @@ options:
|
||||||
completely drained, offering 0% of its available Capacity. Valid range is
|
completely drained, offering 0% of its available Capacity. Valid range is
|
||||||
[0.0,1.0].
|
[0.0,1.0].
|
||||||
required: false
|
required: false
|
||||||
default: '1.0'
|
default: '1'
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
|
@ -422,6 +422,11 @@ options:
|
||||||
elements: str
|
elements: str
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
|
fingerprint:
|
||||||
|
description:
|
||||||
|
- Fingerprint of this resource. A hash of the contents stored in this object. This
|
||||||
|
field is used in optimistic locking.
|
||||||
|
type: str
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- An optional description of this resource.
|
- An optional description of this resource.
|
||||||
|
@ -478,7 +483,7 @@ options:
|
||||||
- The load balancing algorithm used within the scope of the locality.
|
- The load balancing algorithm used within the scope of the locality.
|
||||||
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
||||||
healthy backend is selected in round robin order.
|
healthy backend is selected in round robin order.
|
||||||
- "* LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts
|
- "* LEAST_REQUEST - An algorithm which selects two random healthy hosts
|
||||||
and picks the host which has fewer active requests."
|
and picks the host which has fewer active requests."
|
||||||
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
||||||
to backends. The algorithm has the property that the addition/removal of a host
|
to backends. The algorithm has the property that the addition/removal of a host
|
||||||
|
@ -566,6 +571,7 @@ options:
|
||||||
be used to disable ejection or to ramp it up slowly. Defaults to 0.
|
be used to disable ejection or to ramp it up slowly. Defaults to 0.
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
|
default: 0
|
||||||
enforcing_success_rate:
|
enforcing_success_rate:
|
||||||
description:
|
description:
|
||||||
- The percentage chance that a host will be actually ejected when an outlier
|
- The percentage chance that a host will be actually ejected when an outlier
|
||||||
|
@ -1210,7 +1216,7 @@ localityLbPolicy:
|
||||||
- The load balancing algorithm used within the scope of the locality.
|
- The load balancing algorithm used within the scope of the locality.
|
||||||
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
||||||
healthy backend is selected in round robin order.
|
healthy backend is selected in round robin order.
|
||||||
- "* LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and
|
- "* LEAST_REQUEST - An algorithm which selects two random healthy hosts and
|
||||||
picks the host which has fewer active requests."
|
picks the host which has fewer active requests."
|
||||||
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
||||||
to backends. The algorithm has the property that the addition/removal of a host
|
to backends. The algorithm has the property that the addition/removal of a host
|
||||||
|
@ -1490,6 +1496,7 @@ def main():
|
||||||
options=dict(
|
options=dict(
|
||||||
cache_key_policy=dict(
|
cache_key_policy=dict(
|
||||||
type="dict",
|
type="dict",
|
||||||
|
no_log=False,
|
||||||
options=dict(
|
options=dict(
|
||||||
include_host=dict(type="bool"),
|
include_host=dict(type="bool"),
|
||||||
include_protocol=dict(type="bool"),
|
include_protocol=dict(type="bool"),
|
||||||
|
|
|
@ -549,7 +549,7 @@ resources:
|
||||||
- The load balancing algorithm used within the scope of the locality.
|
- The load balancing algorithm used within the scope of the locality.
|
||||||
- The possible values are - * ROUND_ROBIN - This is a simple policy in which
|
- The possible values are - * ROUND_ROBIN - This is a simple policy in which
|
||||||
each healthy backend is selected in round robin order.
|
each healthy backend is selected in round robin order.
|
||||||
- "* LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts
|
- "* LEAST_REQUEST - An algorithm which selects two random healthy hosts
|
||||||
and picks the host which has fewer active requests."
|
and picks the host which has fewer active requests."
|
||||||
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
||||||
to backends. The algorithm has the property that the addition/removal of a
|
to backends. The algorithm has the property that the addition/removal of a
|
||||||
|
@ -762,7 +762,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -570,14 +570,20 @@ def main():
|
||||||
provisioned_iops=dict(type='int'),
|
provisioned_iops=dict(type='int'),
|
||||||
zone=dict(required=True, type='str'),
|
zone=dict(required=True, type='str'),
|
||||||
source_image_encryption_key=dict(
|
source_image_encryption_key=dict(
|
||||||
type='dict', no_log=True, options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
type='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(raw_key=dict(type='str', no_log=True), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
||||||
),
|
),
|
||||||
disk_encryption_key=dict(
|
disk_encryption_key=dict(
|
||||||
type='dict', no_log=True, options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
type='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(raw_key=dict(type='str', no_log=True), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
||||||
),
|
),
|
||||||
source_snapshot=dict(type='dict', no_log=True),
|
source_snapshot=dict(type='dict', no_log=True),
|
||||||
source_snapshot_encryption_key=dict(
|
source_snapshot_encryption_key=dict(
|
||||||
type='dict', no_log=True, options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
type='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(raw_key=dict(type='str', no_log=True), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -375,7 +375,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -175,7 +175,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -322,7 +322,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -314,7 +314,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -205,7 +205,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -289,7 +289,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -457,7 +457,6 @@ options:
|
||||||
- Indicates whether or not to export logs. This is false by default, which
|
- Indicates whether or not to export logs. This is false by default, which
|
||||||
means no health check logging will be done.
|
means no health check logging will be done.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
project:
|
project:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -527,7 +527,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -204,7 +204,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -204,7 +204,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -545,13 +545,13 @@ def main():
|
||||||
disk_size_gb=dict(type='int'),
|
disk_size_gb=dict(type='int'),
|
||||||
family=dict(type='str'),
|
family=dict(type='str'),
|
||||||
guest_os_features=dict(type='list', elements='dict', options=dict(type=dict(required=True, type='str'))),
|
guest_os_features=dict(type='list', elements='dict', options=dict(type=dict(required=True, type='str'))),
|
||||||
image_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str'))),
|
image_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str', no_log=True))),
|
||||||
labels=dict(type='dict'),
|
labels=dict(type='dict'),
|
||||||
licenses=dict(type='list', elements='str'),
|
licenses=dict(type='list', elements='str'),
|
||||||
name=dict(required=True, type='str'),
|
name=dict(required=True, type='str'),
|
||||||
raw_disk=dict(type='dict', options=dict(container_type=dict(type='str'), sha1_checksum=dict(type='str'), source=dict(required=True, type='str'))),
|
raw_disk=dict(type='dict', options=dict(container_type=dict(type='str'), sha1_checksum=dict(type='str'), source=dict(required=True, type='str'))),
|
||||||
source_disk=dict(type='dict'),
|
source_disk=dict(type='dict'),
|
||||||
source_disk_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str'))),
|
source_disk_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str', no_log=True))),
|
||||||
source_disk_id=dict(type='str'),
|
source_disk_id=dict(type='str'),
|
||||||
source_image=dict(type='dict'),
|
source_image=dict(type='dict'),
|
||||||
source_snapshot=dict(type='dict'),
|
source_snapshot=dict(type='dict'),
|
||||||
|
|
|
@ -351,7 +351,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -61,6 +61,13 @@ options:
|
||||||
- Whether the resource should be protected against deletion.
|
- Whether the resource should be protected against deletion.
|
||||||
required: false
|
required: false
|
||||||
type: bool
|
type: bool
|
||||||
|
discard_local_ssd:
|
||||||
|
description:
|
||||||
|
- Discards the contents of any attached Local SSD disks when changing status
|
||||||
|
to TERMINATED.
|
||||||
|
default: True
|
||||||
|
required: false
|
||||||
|
type: bool
|
||||||
disks:
|
disks:
|
||||||
description:
|
description:
|
||||||
- An array of disks that are associated with the instances that are created from
|
- An array of disks that are associated with the instances that are created from
|
||||||
|
@ -388,6 +395,19 @@ options:
|
||||||
field to "{{ name-of-resource }}"'
|
field to "{{ name-of-resource }}"'
|
||||||
required: false
|
required: false
|
||||||
type: dict
|
type: dict
|
||||||
|
nic_type:
|
||||||
|
description:
|
||||||
|
- Type of network interface card attached to instance.
|
||||||
|
- If unspecified it will use the default provided by GCP.
|
||||||
|
- As the next generation network interface which succeeds VirtIO, gVNIC
|
||||||
|
replaces VirtIO-Net as the only supported network interface in Compute
|
||||||
|
Engine for all new machine types (Generation 3 and onwards).
|
||||||
|
- Newer machine series and networking features require gVNIC instead of VirtIO.
|
||||||
|
required: false
|
||||||
|
type: str
|
||||||
|
choices:
|
||||||
|
- VIRTIO_NET
|
||||||
|
- GVNIC
|
||||||
scheduling:
|
scheduling:
|
||||||
description:
|
description:
|
||||||
- Sets the scheduling options for this instance.
|
- Sets the scheduling options for this instance.
|
||||||
|
@ -1117,6 +1137,7 @@ def main():
|
||||||
state=dict(default='present', choices=['present', 'absent'], type='str'),
|
state=dict(default='present', choices=['present', 'absent'], type='str'),
|
||||||
can_ip_forward=dict(type='bool', aliases=['ip_forward']),
|
can_ip_forward=dict(type='bool', aliases=['ip_forward']),
|
||||||
deletion_protection=dict(type='bool'),
|
deletion_protection=dict(type='bool'),
|
||||||
|
discard_local_ssd=dict(type='bool', required=False, default=True),
|
||||||
disks=dict(
|
disks=dict(
|
||||||
type='list',
|
type='list',
|
||||||
elements='dict',
|
elements='dict',
|
||||||
|
@ -1124,7 +1145,9 @@ def main():
|
||||||
auto_delete=dict(type='bool'),
|
auto_delete=dict(type='bool'),
|
||||||
boot=dict(type='bool'),
|
boot=dict(type='bool'),
|
||||||
device_name=dict(type='str'),
|
device_name=dict(type='str'),
|
||||||
disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), rsa_encrypted_key=dict(type='str'))),
|
disk_encryption_key=dict(type='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(raw_key=dict(type='str', no_log=True), rsa_encrypted_key=dict(type='str', no_log=True))),
|
||||||
index=dict(type='int'),
|
index=dict(type='int'),
|
||||||
initialize_params=dict(
|
initialize_params=dict(
|
||||||
type='dict',
|
type='dict',
|
||||||
|
@ -1133,7 +1156,7 @@ def main():
|
||||||
disk_size_gb=dict(type='int'),
|
disk_size_gb=dict(type='int'),
|
||||||
disk_type=dict(type='str'),
|
disk_type=dict(type='str'),
|
||||||
source_image=dict(type='str', aliases=['image', 'image_family']),
|
source_image=dict(type='str', aliases=['image', 'image_family']),
|
||||||
source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))),
|
source_image_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str', no_log=True))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
interface=dict(type='str'),
|
interface=dict(type='str'),
|
||||||
|
@ -1170,6 +1193,7 @@ def main():
|
||||||
network_ip=dict(type='str'),
|
network_ip=dict(type='str'),
|
||||||
subnetwork=dict(type='dict'),
|
subnetwork=dict(type='dict'),
|
||||||
stack_type=dict(type='str'),
|
stack_type=dict(type='str'),
|
||||||
|
nic_type=dict(type='str', choices=['VIRTIO_NET', 'GVNIC']),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
scheduling=dict(
|
scheduling=dict(
|
||||||
|
@ -1510,7 +1534,9 @@ class InstancePower(object):
|
||||||
return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}/start".format(**self.module.params)
|
return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}/start".format(**self.module.params)
|
||||||
|
|
||||||
def _stop_url(self):
|
def _stop_url(self):
|
||||||
return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}/stop".format(**self.module.params)
|
return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}/stop?discardLocalSsd={discard_local_ssd}".format(
|
||||||
|
**self.module.params
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def deletion_protection_update(module, request, response):
|
def deletion_protection_update(module, request, response):
|
||||||
|
@ -1710,6 +1736,7 @@ class InstanceNetworkinterfacesArray(object):
|
||||||
u'networkIP': item.get('network_ip'),
|
u'networkIP': item.get('network_ip'),
|
||||||
u'stackType': item.get('stack_type'),
|
u'stackType': item.get('stack_type'),
|
||||||
u'subnetwork': replace_resource_dict(item.get(u'subnetwork', {}), 'selfLink'),
|
u'subnetwork': replace_resource_dict(item.get(u'subnetwork', {}), 'selfLink'),
|
||||||
|
u'nicType': item.get('nic_type'),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1722,6 +1749,7 @@ class InstanceNetworkinterfacesArray(object):
|
||||||
u'networkIP': item.get(u'networkIP'),
|
u'networkIP': item.get(u'networkIP'),
|
||||||
u'stackType': item.get('stackType'),
|
u'stackType': item.get('stackType'),
|
||||||
u'subnetwork': item.get(u'subnetwork'),
|
u'subnetwork': item.get(u'subnetwork'),
|
||||||
|
u'nicType': item.get(u'nicType'),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -288,7 +288,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -621,7 +621,8 @@ def main():
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
filters=dict(type="list", elements="str"),
|
filters=dict(type="list", elements="str"),
|
||||||
zone=dict(required=True, type="str"),
|
zone=dict(required=True, type="str"),
|
||||||
)
|
),
|
||||||
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
|
||||||
if not module.params["scopes"]:
|
if not module.params["scopes"]:
|
||||||
|
|
|
@ -1019,7 +1019,9 @@ def main():
|
||||||
auto_delete=dict(type='bool'),
|
auto_delete=dict(type='bool'),
|
||||||
boot=dict(type='bool'),
|
boot=dict(type='bool'),
|
||||||
device_name=dict(type='str'),
|
device_name=dict(type='str'),
|
||||||
disk_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str'), rsa_encrypted_key=dict(type='str'))),
|
disk_encryption_key=dict(type='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(raw_key=dict(type='str', no_log=True), rsa_encrypted_key=dict(type='str', no_log=True))),
|
||||||
index=dict(type='int'),
|
index=dict(type='int'),
|
||||||
initialize_params=dict(
|
initialize_params=dict(
|
||||||
type='dict',
|
type='dict',
|
||||||
|
@ -1028,7 +1030,7 @@ def main():
|
||||||
disk_size_gb=dict(type='int'),
|
disk_size_gb=dict(type='int'),
|
||||||
disk_type=dict(type='str'),
|
disk_type=dict(type='str'),
|
||||||
source_image=dict(type='str'),
|
source_image=dict(type='str'),
|
||||||
source_image_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str'))),
|
source_image_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str', no_log=True))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
interface=dict(type='str'),
|
interface=dict(type='str'),
|
||||||
|
|
|
@ -560,7 +560,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -320,7 +320,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -192,7 +192,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -202,7 +202,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -219,7 +219,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -220,7 +220,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -320,7 +320,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -476,7 +476,7 @@ options:
|
||||||
- The load balancing algorithm used within the scope of the locality.
|
- The load balancing algorithm used within the scope of the locality.
|
||||||
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
||||||
healthy backend is selected in round robin order.
|
healthy backend is selected in round robin order.
|
||||||
- "* LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts
|
- "* LEAST_REQUEST - An algorithm which selects two random healthy hosts
|
||||||
and picks the host which has fewer active requests."
|
and picks the host which has fewer active requests."
|
||||||
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
||||||
to backends. The algorithm has the property that the addition/removal of a host
|
to backends. The algorithm has the property that the addition/removal of a host
|
||||||
|
@ -566,6 +566,7 @@ options:
|
||||||
be used to disable ejection or to ramp it up slowly. Defaults to 0.
|
be used to disable ejection or to ramp it up slowly. Defaults to 0.
|
||||||
required: false
|
required: false
|
||||||
type: int
|
type: int
|
||||||
|
default: 0
|
||||||
enforcing_success_rate:
|
enforcing_success_rate:
|
||||||
description:
|
description:
|
||||||
- The percentage chance that a host will be actually ejected when an outlier
|
- The percentage chance that a host will be actually ejected when an outlier
|
||||||
|
@ -1222,7 +1223,7 @@ localityLbPolicy:
|
||||||
- The load balancing algorithm used within the scope of the locality.
|
- The load balancing algorithm used within the scope of the locality.
|
||||||
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
- The possible values are - * ROUND_ROBIN - This is a simple policy in which each
|
||||||
healthy backend is selected in round robin order.
|
healthy backend is selected in round robin order.
|
||||||
- "* LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and
|
- "* LEAST_REQUEST - An algorithm which selects two random healthy hosts and
|
||||||
picks the host which has fewer active requests."
|
picks the host which has fewer active requests."
|
||||||
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
||||||
to backends. The algorithm has the property that the addition/removal of a host
|
to backends. The algorithm has the property that the addition/removal of a host
|
||||||
|
@ -1507,6 +1508,7 @@ def main():
|
||||||
options=dict(
|
options=dict(
|
||||||
cache_key_policy=dict(
|
cache_key_policy=dict(
|
||||||
type='dict',
|
type='dict',
|
||||||
|
no_log=False,
|
||||||
options=dict(
|
options=dict(
|
||||||
include_host=dict(type='bool'),
|
include_host=dict(type='bool'),
|
||||||
include_protocol=dict(type='bool'),
|
include_protocol=dict(type='bool'),
|
||||||
|
|
|
@ -559,7 +559,7 @@ resources:
|
||||||
- The load balancing algorithm used within the scope of the locality.
|
- The load balancing algorithm used within the scope of the locality.
|
||||||
- The possible values are - * ROUND_ROBIN - This is a simple policy in which
|
- The possible values are - * ROUND_ROBIN - This is a simple policy in which
|
||||||
each healthy backend is selected in round robin order.
|
each healthy backend is selected in round robin order.
|
||||||
- "* LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts
|
- "* LEAST_REQUEST - An algorithm which selects two random healthy hosts
|
||||||
and picks the host which has fewer active requests."
|
and picks the host which has fewer active requests."
|
||||||
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
- "* RING_HASH - The ring/modulo hash load balancer implements consistent hashing
|
||||||
to backends. The algorithm has the property that the addition/removal of a
|
to backends. The algorithm has the property that the addition/removal of a
|
||||||
|
@ -787,7 +787,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -430,9 +430,9 @@ def main():
|
||||||
replica_zones=dict(required=True, type='list', elements='str'),
|
replica_zones=dict(required=True, type='list', elements='str'),
|
||||||
type=dict(type='str'),
|
type=dict(type='str'),
|
||||||
region=dict(required=True, type='str'),
|
region=dict(required=True, type='str'),
|
||||||
disk_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str'))),
|
disk_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str', no_log=True))),
|
||||||
source_snapshot=dict(type='dict'),
|
source_snapshot=dict(type='dict'),
|
||||||
source_snapshot_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str'))),
|
source_snapshot_encryption_key=dict(type='dict', no_log=True, options=dict(raw_key=dict(type='str', no_log=True))),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -452,7 +452,6 @@ options:
|
||||||
- Indicates whether or not to export logs. This is false by default, which
|
- Indicates whether or not to export logs. This is false by default, which
|
||||||
means no health check logging will be done.
|
means no health check logging will be done.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
region:
|
region:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -538,7 +538,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -301,7 +301,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -176,7 +176,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -183,7 +183,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -302,7 +302,6 @@ options:
|
||||||
is considered a match if the match criteria above are NOT met.
|
is considered a match if the match criteria above are NOT met.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
prefix_match:
|
prefix_match:
|
||||||
description:
|
description:
|
||||||
|
@ -364,7 +363,6 @@ options:
|
||||||
- Specifies that prefixMatch and fullPathMatch matches are case sensitive.
|
- Specifies that prefixMatch and fullPathMatch matches are case sensitive.
|
||||||
- Defaults to false.
|
- Defaults to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
metadata_filters:
|
metadata_filters:
|
||||||
description:
|
description:
|
||||||
|
@ -499,7 +497,6 @@ options:
|
||||||
to the Access- Control-Allow-Credentials header. Defaults to
|
to the Access- Control-Allow-Credentials header. Defaults to
|
||||||
false.
|
false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
allow_headers:
|
allow_headers:
|
||||||
description:
|
description:
|
||||||
|
@ -535,7 +532,6 @@ options:
|
||||||
- which indicates that the CORS policy is in effect. Defaults
|
- which indicates that the CORS policy is in effect. Defaults
|
||||||
to false.
|
to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
expose_headers:
|
expose_headers:
|
||||||
description:
|
description:
|
||||||
|
@ -882,7 +878,6 @@ options:
|
||||||
used in TargetHttpProxys. Setting this true for TargetHttpsProxy
|
used in TargetHttpProxys. Setting this true for TargetHttpsProxy
|
||||||
is not permitted. The default is set to false.
|
is not permitted. The default is set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -926,7 +921,6 @@ options:
|
||||||
query portion of the original URL is retained. The default value
|
query portion of the original URL is retained. The default value
|
||||||
is false.
|
is false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_rules:
|
path_rules:
|
||||||
description:
|
description:
|
||||||
|
@ -993,7 +987,6 @@ options:
|
||||||
to the Access- Control-Allow-Credentials header. Defaults to
|
to the Access- Control-Allow-Credentials header. Defaults to
|
||||||
false.
|
false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
allow_headers:
|
allow_headers:
|
||||||
description:
|
description:
|
||||||
|
@ -1373,7 +1366,6 @@ options:
|
||||||
used in TargetHttpProxys. Setting this true for TargetHttpsProxy
|
used in TargetHttpProxys. Setting this true for TargetHttpsProxy
|
||||||
is not permitted. The default is set to false.
|
is not permitted. The default is set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -1416,7 +1408,6 @@ options:
|
||||||
is removed prior to redirecting the request. If set to false, the
|
is removed prior to redirecting the request. If set to false, the
|
||||||
query portion of the original URL is retained.
|
query portion of the original URL is retained.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
default_url_redirect:
|
default_url_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -1441,7 +1432,6 @@ options:
|
||||||
in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
|
in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
|
||||||
The default is set to false.
|
The default is set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -1483,7 +1473,6 @@ options:
|
||||||
removed prior to redirecting the request. If set to false, the query
|
removed prior to redirecting the request. If set to false, the query
|
||||||
portion of the original URL is retained.
|
portion of the original URL is retained.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
tests:
|
tests:
|
||||||
description:
|
description:
|
||||||
|
@ -1541,7 +1530,6 @@ options:
|
||||||
Setting this true for TargetHttpsProxy is not permitted. The default is
|
Setting this true for TargetHttpsProxy is not permitted. The default is
|
||||||
set to false.
|
set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -1582,7 +1570,6 @@ options:
|
||||||
prior to redirecting the request. If set to false, the query portion of
|
prior to redirecting the request. If set to false, the query portion of
|
||||||
the original URL is retained.
|
the original URL is retained.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
region:
|
region:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -1604,7 +1604,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -73,7 +73,6 @@ options:
|
||||||
this reservation. Otherwise, it can be consumed by VMs with affinity for any
|
this reservation. Otherwise, it can be consumed by VMs with affinity for any
|
||||||
reservation. Defaults to false.
|
reservation. Defaults to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
specific_reservation:
|
specific_reservation:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -258,7 +258,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -346,7 +346,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -217,7 +217,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -222,7 +222,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -388,10 +388,14 @@ def main():
|
||||||
source_disk=dict(required=True, type='dict'),
|
source_disk=dict(required=True, type='dict'),
|
||||||
zone=dict(type='str'),
|
zone=dict(type='str'),
|
||||||
snapshot_encryption_key=dict(
|
snapshot_encryption_key=dict(
|
||||||
type='dict', no_log=True, options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
type='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(raw_key=dict(type='str', no_log=True), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
||||||
),
|
),
|
||||||
source_disk_encryption_key=dict(
|
source_disk_encryption_key=dict(
|
||||||
type='dict', no_log=True, options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
type='dict',
|
||||||
|
no_log=True,
|
||||||
|
options=dict(raw_key=dict(type='str', no_log=True), kms_key_name=dict(type='str'), kms_key_service_account=dict(type='str'))
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -260,7 +260,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -171,7 +171,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -207,7 +207,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -226,7 +226,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -171,7 +171,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -193,7 +193,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -178,7 +178,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -224,7 +224,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -183,7 +183,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -175,7 +175,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -186,7 +186,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -70,6 +70,11 @@ options:
|
||||||
the resource.
|
the resource.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
|
fingerprint:
|
||||||
|
description:
|
||||||
|
- Fingerprint of this resource. A hash of the contents stored in this object. This
|
||||||
|
field is used in optimistic locking.
|
||||||
|
type: str
|
||||||
header_action:
|
header_action:
|
||||||
description:
|
description:
|
||||||
- Specifies changes to request and response headers that need to take effect for
|
- Specifies changes to request and response headers that need to take effect for
|
||||||
|
@ -357,7 +362,6 @@ options:
|
||||||
to the Access- Control-Allow-Credentials header. Defaults to
|
to the Access- Control-Allow-Credentials header. Defaults to
|
||||||
false.
|
false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
allow_headers:
|
allow_headers:
|
||||||
description:
|
description:
|
||||||
|
@ -737,7 +741,6 @@ options:
|
||||||
used in TargetHttpProxys. Setting this true for TargetHttpsProxy
|
used in TargetHttpProxys. Setting this true for TargetHttpsProxy
|
||||||
is not permitted. The default is set to false.
|
is not permitted. The default is set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -780,7 +783,6 @@ options:
|
||||||
is removed prior to redirecting the request. If set to false, the
|
is removed prior to redirecting the request. If set to false, the
|
||||||
query portion of the original URL is retained.
|
query portion of the original URL is retained.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
route_rules:
|
route_rules:
|
||||||
description:
|
description:
|
||||||
|
@ -948,7 +950,6 @@ options:
|
||||||
is considered a match if the match criteria above are NOT met.
|
is considered a match if the match criteria above are NOT met.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
prefix_match:
|
prefix_match:
|
||||||
description:
|
description:
|
||||||
|
@ -1010,7 +1011,6 @@ options:
|
||||||
- Specifies that prefixMatch and fullPathMatch matches are case sensitive.
|
- Specifies that prefixMatch and fullPathMatch matches are case sensitive.
|
||||||
- Defaults to false.
|
- Defaults to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
metadata_filters:
|
metadata_filters:
|
||||||
description:
|
description:
|
||||||
|
@ -1145,7 +1145,6 @@ options:
|
||||||
to the Access- Control-Allow-Credentials header. Defaults to
|
to the Access- Control-Allow-Credentials header. Defaults to
|
||||||
false.
|
false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
allow_headers:
|
allow_headers:
|
||||||
description:
|
description:
|
||||||
|
@ -1181,7 +1180,6 @@ options:
|
||||||
- which indicates that the CORS policy is in effect. Defaults
|
- which indicates that the CORS policy is in effect. Defaults
|
||||||
to false.
|
to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
expose_headers:
|
expose_headers:
|
||||||
description:
|
description:
|
||||||
|
@ -1531,7 +1529,6 @@ options:
|
||||||
- Setting this true for TargetHttpsProxy is not permitted. Defaults
|
- Setting this true for TargetHttpsProxy is not permitted. Defaults
|
||||||
to false.
|
to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -1569,7 +1566,6 @@ options:
|
||||||
is removed prior to redirecting the request. If set to false, the
|
is removed prior to redirecting the request. If set to false, the
|
||||||
query portion of the original URL is retained. Defaults to false.
|
query portion of the original URL is retained. Defaults to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
default_url_redirect:
|
default_url_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -1594,7 +1590,6 @@ options:
|
||||||
in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
|
in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
|
||||||
The default is set to false.
|
The default is set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -1636,7 +1631,6 @@ options:
|
||||||
removed prior to redirecting the request. If set to false, the query
|
removed prior to redirecting the request. If set to false, the query
|
||||||
portion of the original URL is retained.
|
portion of the original URL is retained.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
default_route_action:
|
default_route_action:
|
||||||
description:
|
description:
|
||||||
|
@ -1733,7 +1727,6 @@ options:
|
||||||
- If true, headerValue is set for the header, discarding any
|
- If true, headerValue is set for the header, discarding any
|
||||||
values that were set for that header.
|
values that were set for that header.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
response_headers_to_remove:
|
response_headers_to_remove:
|
||||||
description:
|
description:
|
||||||
|
@ -1767,7 +1760,6 @@ options:
|
||||||
- If true, headerValue is set for the header, discarding any
|
- If true, headerValue is set for the header, discarding any
|
||||||
values that were set for that header.
|
values that were set for that header.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
url_rewrite:
|
url_rewrite:
|
||||||
description:
|
description:
|
||||||
|
@ -1960,14 +1952,12 @@ options:
|
||||||
that the actual request can include user credentials.
|
that the actual request can include user credentials.
|
||||||
- This translates to the Access-Control-Allow-Credentials header.
|
- This translates to the Access-Control-Allow-Credentials header.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
disabled:
|
disabled:
|
||||||
description:
|
description:
|
||||||
- If true, specifies the CORS policy is disabled. The default value
|
- If true, specifies the CORS policy is disabled. The default value
|
||||||
is false, which indicates that the CORS policy is in effect.
|
is false, which indicates that the CORS policy is in effect.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
fault_injection_policy:
|
fault_injection_policy:
|
||||||
description:
|
description:
|
||||||
|
@ -2095,7 +2085,6 @@ options:
|
||||||
Setting this true for TargetHttpsProxy is not permitted. The default is
|
Setting this true for TargetHttpsProxy is not permitted. The default is
|
||||||
set to false.
|
set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
path_redirect:
|
path_redirect:
|
||||||
description:
|
description:
|
||||||
|
@ -2136,7 +2125,6 @@ options:
|
||||||
prior to redirecting the request. If set to false, the query portion of
|
prior to redirecting the request. If set to false, the query portion of
|
||||||
the original URL is retained. The default is set to false.
|
the original URL is retained. The default is set to false.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
default_route_action:
|
default_route_action:
|
||||||
description:
|
description:
|
||||||
|
@ -2231,8 +2219,6 @@ options:
|
||||||
exist for the header.
|
exist for the header.
|
||||||
- If true, headerValue is set for the header, discarding any values
|
- If true, headerValue is set for the header, discarding any values
|
||||||
that were set for that header.
|
that were set for that header.
|
||||||
required: false
|
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
response_headers_to_remove:
|
response_headers_to_remove:
|
||||||
description:
|
description:
|
||||||
|
@ -2266,7 +2252,6 @@ options:
|
||||||
- If true, headerValue is set for the header, discarding any values
|
- If true, headerValue is set for the header, discarding any values
|
||||||
that were set for that header.
|
that were set for that header.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
url_rewrite:
|
url_rewrite:
|
||||||
description:
|
description:
|
||||||
|
@ -2456,14 +2441,12 @@ options:
|
||||||
the actual request can include user credentials.
|
the actual request can include user credentials.
|
||||||
- This translates to the Access-Control-Allow-Credentials header.
|
- This translates to the Access-Control-Allow-Credentials header.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
disabled:
|
disabled:
|
||||||
description:
|
description:
|
||||||
- If true, specifies the CORS policy is disabled. The default value is
|
- If true, specifies the CORS policy is disabled. The default value is
|
||||||
false, which indicates that the CORS policy is in effect.
|
false, which indicates that the CORS policy is in effect.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
|
||||||
type: bool
|
type: bool
|
||||||
fault_injection_policy:
|
fault_injection_policy:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -2487,7 +2487,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -247,7 +247,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
|
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']
|
||||||
|
|
|
@ -1528,7 +1528,9 @@ def main():
|
||||||
accelerators=dict(type='list', elements='dict', options=dict(accelerator_count=dict(type='str'), accelerator_type=dict(type='str'))),
|
accelerators=dict(type='list', elements='dict', options=dict(accelerator_count=dict(type='str'), accelerator_type=dict(type='str'))),
|
||||||
disk_type=dict(type='str'),
|
disk_type=dict(type='str'),
|
||||||
min_cpu_platform=dict(type='str'),
|
min_cpu_platform=dict(type='str'),
|
||||||
taints=dict(type='list', elements='dict', options=dict(key=dict(type='str'), value=dict(type='str'), effect=dict(type='str'))),
|
taints=dict(type='list',
|
||||||
|
elements='dict',
|
||||||
|
options=dict(key=dict(type='str', no_log=False), value=dict(type='str'), effect=dict(type='str'))),
|
||||||
shielded_instance_config=dict(
|
shielded_instance_config=dict(
|
||||||
type='dict', options=dict(enable_secure_boot=dict(type='bool'), enable_integrity_monitoring=dict(type='bool'))
|
type='dict', options=dict(enable_secure_boot=dict(type='bool'), enable_integrity_monitoring=dict(type='bool'))
|
||||||
),
|
),
|
||||||
|
@ -1538,7 +1540,7 @@ def main():
|
||||||
type='dict',
|
type='dict',
|
||||||
options=dict(
|
options=dict(
|
||||||
username=dict(type='str'),
|
username=dict(type='str'),
|
||||||
password=dict(type='str'),
|
password=dict(type='str', no_log=True),
|
||||||
client_certificate_config=dict(type='dict', options=dict(issue_client_certificate=dict(type='bool'))),
|
client_certificate_config=dict(type='dict', options=dict(issue_client_certificate=dict(type='bool'))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -859,7 +859,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str', aliases=['region', 'zone'])))
|
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str', aliases=['region', 'zone'])), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -764,7 +764,9 @@ def main():
|
||||||
accelerators=dict(type='list', elements='dict', options=dict(accelerator_count=dict(type='int'), accelerator_type=dict(type='str'))),
|
accelerators=dict(type='list', elements='dict', options=dict(accelerator_count=dict(type='int'), accelerator_type=dict(type='str'))),
|
||||||
disk_type=dict(type='str'),
|
disk_type=dict(type='str'),
|
||||||
min_cpu_platform=dict(type='str'),
|
min_cpu_platform=dict(type='str'),
|
||||||
taints=dict(type='list', elements='dict', options=dict(key=dict(type='str'), value=dict(type='str'), effect=dict(type='str'))),
|
taints=dict(type='list',
|
||||||
|
elements='dict',
|
||||||
|
options=dict(key=dict(type='str', no_log=False), value=dict(type='str'), effect=dict(type='str'))),
|
||||||
shielded_instance_config=dict(
|
shielded_instance_config=dict(
|
||||||
type='dict', options=dict(enable_secure_boot=dict(type='bool'), enable_integrity_monitoring=dict(type='bool'))
|
type='dict', options=dict(enable_secure_boot=dict(type='bool'), enable_integrity_monitoring=dict(type='bool'))
|
||||||
),
|
),
|
||||||
|
|
|
@ -450,7 +450,8 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str', aliases=['region', 'zone']), cluster=dict(required=True, type='dict')))
|
module = GcpModule(argument_spec=dict(location=dict(required=True, type='str', aliases=['region', 'zone']), cluster=dict(required=True, type='dict')),
|
||||||
|
supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform']
|
||||||
|
|
|
@ -508,8 +508,12 @@ def main():
|
||||||
default_key_specs=dict(
|
default_key_specs=dict(
|
||||||
type='list',
|
type='list',
|
||||||
elements='dict',
|
elements='dict',
|
||||||
|
no_log=False,
|
||||||
options=dict(
|
options=dict(
|
||||||
algorithm=dict(type='str'), key_length=dict(type='int'), key_type=dict(type='str'), kind=dict(default='dns#dnsKeySpec', type='str')
|
algorithm=dict(type='str'),
|
||||||
|
key_length=dict(type='int', no_log=False),
|
||||||
|
key_type=dict(type='str'),
|
||||||
|
kind=dict(default='dns#dnsKeySpec', type='str')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -308,7 +308,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = GcpModule(argument_spec=dict(dns_name=dict(type='list', elements='str')))
|
module = GcpModule(argument_spec=dict(dns_name=dict(type='list', elements='str')), supports_check_mode=True)
|
||||||
|
|
||||||
if not module.params['scopes']:
|
if not module.params['scopes']:
|
||||||
module.params['scopes'] = ['https://www.googleapis.com/auth/ndev.clouddns.readwrite']
|
module.params['scopes'] = ['https://www.googleapis.com/auth/ndev.clouddns.readwrite']
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue