steampipe plugin install gcp

Table: gcp_redis_instance - Query Google Cloud Platform Redis Instances using SQL

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

Table Usage Guide

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

Examples

Basic info

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

select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance;
select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance;

List instances that have authentication enabled

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

select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
auth_enabled;
select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
auth_enabled = 1;

List instances 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,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
create_time >= current_timestamp - interval '7 days';
select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
create_time >= datetime('now', '-7 days');

List the node details of each instance

Gain insights into the specific details of each instance node in your Google Cloud 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,
display_name,
create_time,
location_id,
jsonb_pretty(nodes) as instance_nodes
from
gcp_redis_instance
where
name = 'instance-test'
and location_id = 'europe-west3-c';
select
name,
display_name,
create_time,
location_id,
nodes as instance_nodes
from
gcp_redis_instance
where
name = 'instance-test'
and location_id = 'europe-west3-c';

List instances encrypted with customer-managed keys

Discover the segments that utilize customer-managed encryption for their instances. This is useful to assess the security measures and determine areas that might need additional protection.

select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
customer_managed_key is not null;
select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
customer_managed_key is not null;

List instances that have transit mode disabled

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

select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
transit_encryption_mode = 2;
select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
transit_encryption_mode = 2;

List the maintenance details of instances

Explore the maintenance characteristics of your instances to identify when and how often maintenance is performed, as well as the versions available for maintenance. This can help you manage and plan your maintenance activities more effectively.

select
name,
display_name,
create_time,
location_id,
maintenance_policy,
maintenance_schedule,
maintenance_version,
available_maintenance_versions
from
gcp_redis_instance;
select
name,
display_name,
create_time,
location_id,
maintenance_policy,
maintenance_schedule,
maintenance_version,
available_maintenance_versions
from
gcp_redis_instance;

List instances with direct peering access

Explore which instances have direct peering access in order to better manage your network and ensure secure connections. This can be especially useful for maintaining optimal performance and security in your GCP Redis instances.

select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
connect_mode = 1;
select
name,
display_name,
create_time,
location_id,
memory_size_gb,
reserved_ip_range
from
gcp_redis_instance
where
connect_mode = 1;

Schema for gcp_redis_instance

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
alternative_location_idtextIf specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
auth_enabledbooleanIndicates whether OSS Redis AUTH is enabled for the instance.
authorized_networktextThe full name of the Google Compute Engine to which the instance is connected. If left unspecified, the `default` network will be used.
available_maintenance_versionsjsonbThe available maintenance versions that an instance could update to.
connect_modebigintThe network connect mode of the Redis instance.
create_timetimestamp with time zoneThe time the instance was created.
current_location_idtextThe current zone where the Redis primary node is located. In basic tier, this will always be the same as [location_id]. In standard tier, this can be the zone of any node in the instance.
customer_managed_keytextThe KMS key reference that the customer provides when trying to create the instance.
display_nametextAn arbitrary and optional user-provided name for the instance.
hosttextHostname or IP address of the exposed Redis endpoint used by clients to connect to the service.
labelsjsonbResource labels to represent user provided metadata.
locationtext=The GCP multi-region, region, or zone in which the resource is located.
location_idtextThe zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance.
maintenance_policyjsonbThe maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
maintenance_schedulejsonbDate and time of upcoming maintenance events which have been scheduled.
maintenance_versiontextThe self service update maintenance version.
memory_size_gbbigintRedis memory size in GiB.
nametext=Unique name of the resource in this scope including project and location.
nodesjsonbInfo per node.
persistence_configjsonbPersistence configuration parameters.
persistence_iam_identitytextCloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is `serviceAccount:<service_account_email>`.
portbigintThe port number of the exposed Redis endpoint.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
read_endpointtextHostname or IP address of the exposed readonly Redis endpoint.
read_endpoint_portbigintThe port number of the exposed readonly redis endpoint.
read_replicas_modebigintRead replicas mode for the instance.
redis_configsjsonbRedis configuration parameters.
redis_versiontextThe version of Redis software.
replica_countbigintThe number of replica nodes.
reserved_ip_rangetextThe reserved IP range for the instnce.
secondary_ip_rangetextAdditional IP range for node placement.
server_ca_certsjsonbList of server CA certificates for the instance.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statebigintThe current state of this instance.
status_messagetextAdditional information about the current status of this instance, if available.
suspension_reasonsjsonbReasons that causes instance in `SUSPENDED` state.
tierbigintThe service tier of the instance.
titletextTitle of the resource.
transit_encryption_modebigintThe TLS mode of the Redis instance.

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_instance