Part 6: Storage & Databases: Cloud SQL, GCS, and Managed Storage Services

AuthorEmmanuel Secretaria

Published Aug 13, 2025

Inventory databases and storage services across SQL, object storage, and managed caching for a full persistence map.

Share

Scope inspiration:

gcp_info_storage.sh, gcp_info_cloud_sql.sh, gcp_info_cloud_sql_backups.sh.

This series follows the repo’s GCP inventory flow so every step builds a repeatable, audit-friendly picture of your environment. Part 6 focuses on persistence: databases, buckets, and managed storage tiers.


What this script does (walkthrough)

The storage inventory intentionally chains into Cloud SQL discovery before enumerating other persistence services.

  1. List Cloud SQL instances and show backup configuration status.
  2. Enumerate GCS buckets to map object storage.
  3. List Filestore and Memorystore instances when their APIs are enabled.
  4. List Bigtable clusters and instances regardless of API enablement to catch legacy or transitional usage.
  5. Surface Datastore indexes, suppressing errors if none exist.

Operational caveats and gotchas

  • Bucket listing depends on the storage-component API being enabled; the script intentionally skips it otherwise.
  • Datastore index listing may error if indexes don’t exist; the script suppresses failures to keep the report flowing.
  • Cloud SQL backups are summarized in the storage inventory, but detailed backup/export workflows are covered separately in Part 7.

Example command usage

# Full storage inventory
gcp/gcp_info_storage.sh
# Cloud SQL overview only
# (includes backup configuration summary)
gcp/gcp_info_cloud_sql.sh