steampipe plugin install gcp

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,
location
from
gcp_alloydb_cluster;
select
name,
state,
display_name,
database_version,
location
from
gcp_alloydb_cluster;

List clusters by state

Identify AlloyDB clusters in a specific state to manage and troubleshoot operational needs effectively.

select
name,
state
from
gcp_alloydb_cluster
where
state = 'MAINTENANCE';
select
name,
state
from
gcp_alloydb_cluster
where
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_config
from
gcp_alloydb_cluster
where
display_name = 'your-cluster-name';
select
name,
json_extract(encryption_config, '$') as encryption_config,
json_detail(network_config, '$') as network_config
from
gcp_alloydb_cluster
where
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,
location
from
gcp_alloydb_cluster
where
database_version = 'POSTGRES_14';
select
name,
database_version,
state,
location
from
gcp_alloydb_cluster
where
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_config
from
gcp_alloydb_cluster
where
encryption_config is not null;
select
name,
json_extract(encryption_config, '$')
from
gcp_alloydb_cluster
where
encryption_config is not null;

Schema for gcp_alloydb_cluster

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
annotationsjsonbAnnotations to allow client tools to store a small amount of arbitrary data.
automated_backup_policyjsonbThe automated backup policy for this cluster.
backup_sourcejsonbCluster created from backup.
cluster_typetextThe type of the cluster.
continuous_backup_configjsonbContinuous backup configuration for this cluster.
continuous_backup_infojsonbContinuous backup properties for this cluster.
create_timetimestamp with time zoneThe create timestamp.
database_versiontextThe database engine major version.
delete_timetimestamp with time zoneThe delete timestamp.
display_nametext=User-settable and human-readable display name for the Cluster.
encryption_configjsonbEncryption config to encrypt the data disks.
encryption_infojsonbThe encryption information for the cluster.
etagtextFor Resource freshness validation.
initial_userjsonbInitial user to setup during cluster creation.
labelsjsonbLabels as key-value pairs.
locationtext=The GCP multi-region, region, or zone in which the resource is located.
migration_sourcejsonbCluster created via DMS migration.
nametextThe name of the cluster resource.
networktextThe resource link for the VPC network.
network_configjsonbNetwork configuration details.
primary_configjsonbCross Region replication config specific to PRIMARY cluster.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
reconcilingbooleanIndicates if the cluster's current state does not match the intended state.
satisfies_pzsbooleanReserved for future use.
secondary_configjsonbCross Region replication config specific to SECONDARY cluster.
self_linktextServer-defined URL for the resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
ssl_configjsonbSSL configuration for this AlloyDB cluster.
statetextThe current serving state of the cluster.
titletextTitle of the resource.
uidtextThe system-generated UID of the resource.
update_timetimestamp with time zoneThe 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