Introduction

google.cloud is the Ansible Collection that provides modules and plugins for managing Google Cloud Platform resources: Compute Engine instances, Cloud SQL, Cloud Storage, VPC networking, and more, all driven from Ansible playbooks via the GCP APIs. Version 1.16.0 has been published to Ansible Galaxy, moving up from 1.15.0. This release introduces a new signed-URL module for Cloud Storage, two new Network Connectivity Center modules, an edition option for Cloud SQL instances, and a sizeable set of fixes to the collection's internal audit/compliance tooling.

Whats New

Minor Changes

  • Added gcp_storage_signed_url module - generates a V4 signed URL for a GCS object, so a party without any IAM access to the bucket can perform a single HTTP request against that object until the URL expires. Signing can be done via the IAM Credentials API (signBlob, using a service account other than the one running the module) or locally via an HMAC key, with no IAM API call and no serviceAccountTokenCreator grant required for the latter.
  • audit - added tests/unit/audit/test_event_query_contract.py, asserting the constraints the controller imposes on the query file (PR #781).
  • audit - dropped the mappings for gcp_resource_record_set and gcp_sourcerepo_repository; neither module exists in this collection (PR #781).
  • event_query - the contract test now compiles every expression with jq, instead of only reading the query as text, which previously allowed an expression that cannot actually run to pass.
  • gcp_networkconnectivity_* - added gcp_networkconnectivity_hub and gcp_networkconnectivity_spoke, with accompanying _info modules (PR #788).
  • gcp_sql_instance - added edition option under settings (e.g. ENTERPRISE, ENTERPRISE_PLUS) to allow specifying the Cloud SQL instance edition (PR #784).

Bugfixes

  • ansible-mmv1(templates) - reverted to a 3-way boolean check for custom diff logic, so a custom diff can be forced even when the values aren't actually different.
  • ansible-mmv1(templates) - fixed the DOCUMENTATION block incorrectly printing short_description at the end of the block due to alphabetical ordering (issue #789, fix commit).
  • ansible-mmv1(templates) - fixed the RETURNS block showing incomplete output (commit).
  • audit - device_type was looked up by the resource kind, which no module's response_to_hash() returns, so every resource would have been labelled missing. Each module now carries its resource type literally (PR #781).
  • audit - gcp_container_cluster and gcp_container_node_pool were keyed on .name, which the GKE API returns as the short name only. Same-named node pools in different clusters, and same-named clusters in different projects or locations, collapsed into a single indirect node, and because the controller requires name to be unique within a job, a job touching two of them lost every audit record it produced. Both now key on the full resource identity (.id/.selfLink) (PR #781).
  • audit - gcp_dns_resource_record_set guarded only .name, so a result carrying no .type emitted the identifier "<name>/null" (since null | tostring is the string "null", not null), and every such record in a job collided on the same identifier. .type is now guarded as well (PR #781).
  • audit - gcp_dns_resource_record_set was identified by name alone, so an A record and a TXT record on the same name (two distinct resources) were collapsed into one (PR #781).
  • audit - name was part of canonical_facts, the only key the controller deduplicates on, so a renamed resource was counted twice (PR #781).
  • audit - the identifier fell back to etag when a module returned no id. Since etag changes on every mutation, gcp_filestore_instance - the only module in the collection that returns no id - was affected by this fallback behavior (PR #781).

Component Overview

AreaChangeReference
gcp_storage_signed_urlNew module for V4 signed GCS URLsn/a
gcp_networkconnectivity_hub / _spoke (+ _info)New modules for Network Connectivity CenterPR #788
gcp_sql_instanceNew edition option under settingsPR #784
audit internalsMultiple identity/dedup fixes across GKE, DNS, Filestore, and resource-type lookupPR #781
ansible-mmv1 templatesDOCUMENTATION/RETURNS block generation fixes, custom diff logic revertedissue #789

How to Test

Install or upgrade the collection from Ansible Galaxy and confirm the version reported matches 1.16.0.

# Install the specific version
ansible-galaxy collection install google.cloud:1.16.0

# Or upgrade to the latest available version
ansible-galaxy collection install google.cloud --upgrade

# Verify the installed version
ansible-galaxy collection list google.cloud

# Inspect the new signed URL module documentation
ansible-doc google.cloud.gcp_storage_signed_url

# Inspect the new Network Connectivity Center modules
ansible-doc google.cloud.gcp_networkconnectivity_hub
ansible-doc google.cloud.gcp_networkconnectivity_spoke

For automation controller users relying on the audit/event_query tooling bundled with this collection, re-run any affected jobs touching GKE clusters/node pools, DNS resource record sets, or Filestore instances after upgrading, since several of the fixes above directly change how those resources are deduplicated and identified.