steampipe plugin install gcp

Table: gcp_redis_cluster - Query Google Cloud Platform Memorystore Redis Clusters using SQL

Google Cloud Platform's Memorystore Redis Cluster service is a fully managed service that powers applications with low-latency data access. It provides secure and highly available Redis clusters while Google handles all the underlying infrastructure for you. Redis clusters are ideal for use cases such as caching, session storage, gaming leaderboards, real-time analytics, and queueing.

Table Usage Guide

The gcp_redis_cluster table provides insights into Memorystore Redis Clusters within Google Cloud Platform. As a DevOps engineer, you can explore cluster-specific details through this table, including the cluster's ID, name, region, and current status. Utilize it to monitor and manage your Redis clusters, ensuring they are configured correctly and running efficiently.

Examples

Basic info

Explore which Google Cloud Platform (GCP) Memorystore Redis clusters have been created, along with their creation times, locations, memory sizes, and IP addresses. This is useful for gaining insights into your GCP Memorystore Redis clusters' configurations and understanding how your resources are being utilized.

select
name,
create_time,
location,
size_gb,
precise_size_gb,
psc_connections [ 0 ] ->> 'address' as address
from
gcp_redis_cluster;
select
name,
create_time,
location,
size_gb,
precise_size_gb,
psc_connections [ 0 ] -> 'address' as address
from
gcp_redis_cluster;

List clusters that have IAM authorization enabled

Discover the segments that have enabled IAM authorization to enhance security measures and maintain data privacy within your GCP Memorystore Redis clusters. This can be particularly useful in identifying potential vulnerabilities and ensuring compliance with best practices.

select
name,
create_time,
location,
psc_connections [ 0 ] ->> 'address' as address
from
gcp_redis_cluster
where
authorization_mode = 1;
select
name,
create_time,
location,
psc_connections [ 0 ] -> 'address' as address
from
gcp_redis_cluster
where
authorization_mode = 1;

List clusters created in the last 7 days

Discover the segments that have been newly added within the past week. This is beneficial in monitoring the growth and changes in your database over a short period.

select
name,
create_time,
location,
psc_connections [ 0 ] ->> 'address' as address
from
gcp_redis_cluster
where
create_time >= current_timestamp - interval '7 days';
select
name,
create_time,
location,
psc_connections [ 0 ] -> 'address' as address
from
gcp_redis_cluster
where
create_time >= datetime('now', '-7 days');

Get node details of each cluster

Gain insights into the specific details of each cluster node in your GCP Memorystore Redis database, such as the creation time and location. This can be particularly useful for troubleshooting or for optimizing your database's performance and security.

select
name,
create_time,
location,
node_type,
size_gb,
replica_count,
shard_count
from
gcp_redis_cluster
where
name = 'cluster-test'
and location = 'europe-west9';
select
name,
create_time,
location,
node_type,
size_gb,
replica_count,
shard_count
from
gcp_redis_cluster
where
name = 'cluster-test'
and location = 'europe-west9';

List clusters that have in-transit encryption disabled

Discover the segments where in-transit encryption is disabled in clusters. This is particularly useful in identifying potential security risks and ensuring data protection standards are maintained.

select
name,
create_time,
location,
psc_connections [ 0 ] ->> 'address' as address
from
gcp_redis_cluster
where
transit_encryption_mode != 2;
select
name,
create_time,
location,
psc_connections [ 0 ] -> 'address' as address
from
gcp_redis_cluster
where
transit_encryption_mode != 2;

Schema for gcp_redis_cluster

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
authorization_modebigintThe authorization mode of the Redis cluster.
create_timetimestamp with time zoneThe timestamp associated with the cluster creation request.
cross_cluster_replication_configjsonbCross cluster replication config.
deletion_protection_enabledjsonbThe delete operation will fail when the value is set to true.
discovery_endpointsjsonbEndpoints created on each given network, for Redis clients to connect to the cluster.
locationtext=The GCP multi-region, region, or zone in which the resource is located.
nametext=Unique name of the resource in this scope including project and location.
node_typebigintThe type of Redis nodes in the cluster that determines the underlying machine-type.
persistence_configjsonbPersistence config (RDB, AOF) for the cluster.
precise_size_gbdouble precisionPrecise value of redis memory size in GB for the entire cluster.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
psc_configsjsonbEach PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation.
psc_connectionsjsonbPSC connections for discovery of the cluster topology and accessing the cluster.
redis_configsjsonbKey/Value pairs of customer overrides for mutable Redis Configs.
replica_countbigintThe number of replica nodes per shard.
shard_countbigintNumber of shards for the Redis cluster.
size_gbdouble precisionRedis memory size in GB for the entire cluster rounded up to the next integer.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statebigintThe current state of this cluster.
state_infojsonbAdditional information about the current state of the cluster.
titletextTitle of the resource.
transit_encryption_modebigintThe in-transit encryption for the Redis cluster.
uidtextSystem assigned, unique identifier for the cluster.
zone_distribution_configjsonbThis config will be used to determine how the customer wants us to distribute cluster resources within the region.

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_redis_cluster