Table: gcp_alloydb_cluster - Query Google Cloud Platform AlloyDB Clusters using SQL
Google Cloud AlloyDB is a fully managed, PostgreSQL-compatible database service optimized for performance and scalability. Built on Google's infrastructure, AlloyDB provides high availability, security, and integration with other services, making it ideal for enterprise database management solutions.
Table Usage Guide
The gcp_alloydb_cluster
table enables you to query information about AlloyDB clusters within Google Cloud Platform. It is useful for database administrators and developers to monitor the operational aspects of their AlloyDB environments, including configuration details, current state, and resource utilization.
Examples
Basic info
Retrieve basic information about your Google Cloud Platform's AlloyDB clusters. Useful for a quick overview and operational monitoring of cluster attributes.
select name, state, display_name, database_version, locationfrom gcp_alloydb_cluster;
select name, state, display_name, database_version, locationfrom gcp_alloydb_cluster;
List clusters by state
Identify AlloyDB clusters in a specific state to manage and troubleshoot operational needs effectively.
select name, statefrom gcp_alloydb_clusterwhere state = 'MAINTENANCE';
select name, statefrom gcp_alloydb_clusterwhere state = 'MAINTENANCE';
Detailed configuration of a cluster
Access detailed configuration settings of an AlloyDB cluster to understand its setup and make informed decisions about scaling and modifications.
select name, encryption_config, network_configfrom gcp_alloydb_clusterwhere display_name = 'your-cluster-name';
select name, json_extract(encryption_config, '$') as encryption_config, json_detail(network_config, '$') as network_configfrom gcp_alloydb_clusterwhere display_name = 'your-cluster-name';
List Clusters with Specific Database Version
This query retrieves all AlloyDB clusters that are using a specific database version, which is helpful for auditing purposes or planning upgrades.
select name, database_version, state, locationfrom gcp_alloydb_clusterwhere database_version = 'POSTGRES_14';
select name, database_version, state, locationfrom gcp_alloydb_clusterwhere database_version = 'POSTGRES_14';
Find Clusters with Encryption Enabled
This query is useful to ensure compliance by checking which clusters have encryption configured.
select name, encryption_configfrom gcp_alloydb_clusterwhere encryption_config is not null;
select name, json_extract(encryption_config, '$')from gcp_alloydb_clusterwhere encryption_config is not null;
Schema for gcp_alloydb_cluster
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
annotations | jsonb | Annotations to allow client tools to store a small amount of arbitrary data. | |
automated_backup_policy | jsonb | The automated backup policy for this cluster. | |
backup_source | jsonb | Cluster created from backup. | |
cluster_type | text | The type of the cluster. | |
continuous_backup_config | jsonb | Continuous backup configuration for this cluster. | |
continuous_backup_info | jsonb | Continuous backup properties for this cluster. | |
create_time | timestamp with time zone | The create timestamp. | |
database_version | text | The database engine major version. | |
delete_time | timestamp with time zone | The delete timestamp. | |
display_name | text | = | User-settable and human-readable display name for the Cluster. |
encryption_config | jsonb | Encryption config to encrypt the data disks. | |
encryption_info | jsonb | The encryption information for the cluster. | |
etag | text | For Resource freshness validation. | |
initial_user | jsonb | Initial user to setup during cluster creation. | |
labels | jsonb | Labels as key-value pairs. | |
location | text | = | The GCP multi-region, region, or zone in which the resource is located. |
migration_source | jsonb | Cluster created via DMS migration. | |
name | text | The name of the cluster resource. | |
network | text | The resource link for the VPC network. | |
network_config | jsonb | Network configuration details. | |
primary_config | jsonb | Cross Region replication config specific to PRIMARY cluster. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
reconciling | boolean | Indicates if the cluster's current state does not match the intended state. | |
satisfies_pzs | boolean | Reserved for future use. | |
secondary_config | jsonb | Cross Region replication config specific to SECONDARY cluster. | |
self_link | text | Server-defined URL for the resource. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
ssl_config | jsonb | SSL configuration for this AlloyDB cluster. | |
state | text | The current serving state of the cluster. | |
title | text | Title of the resource. | |
uid | text | The system-generated UID of the resource. | |
update_time | timestamp with time zone | The update timestamp. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- gcp
You can pass the configuration to the command with the --config
argument:
steampipe_export_gcp --config '<your_config>' gcp_alloydb_cluster