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_rangefrom gcp_redis_instance;
select name, display_name, create_time, location_id, memory_size_gb, reserved_ip_rangefrom 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_rangefrom gcp_redis_instancewhere auth_enabled;
select name, display_name, create_time, location_id, memory_size_gb, reserved_ip_rangefrom gcp_redis_instancewhere 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_rangefrom gcp_redis_instancewhere create_time >= current_timestamp - interval '7 days';
select name, display_name, create_time, location_id, memory_size_gb, reserved_ip_rangefrom gcp_redis_instancewhere 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_nodesfrom gcp_redis_instancewhere name = 'instance-test' and location_id = 'europe-west3-c';
select name, display_name, create_time, location_id, nodes as instance_nodesfrom gcp_redis_instancewhere 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_rangefrom gcp_redis_instancewhere customer_managed_key is not null;
select name, display_name, create_time, location_id, memory_size_gb, reserved_ip_rangefrom gcp_redis_instancewhere 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_rangefrom gcp_redis_instancewhere transit_encryption_mode = 2;
select name, display_name, create_time, location_id, memory_size_gb, reserved_ip_rangefrom gcp_redis_instancewhere 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_versionsfrom gcp_redis_instance;
select name, display_name, create_time, location_id, maintenance_policy, maintenance_schedule, maintenance_version, available_maintenance_versionsfrom 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_rangefrom gcp_redis_instancewhere connect_mode = 1;
select name, display_name, create_time, location_id, memory_size_gb, reserved_ip_rangefrom gcp_redis_instancewhere connect_mode = 1;
Schema for gcp_redis_instance
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. | |
alternative_location_id | text | If 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_enabled | boolean | Indicates whether OSS Redis AUTH is enabled for the instance. | |
authorized_network | text | The full name of the Google Compute Engine to which the instance is connected. If left unspecified, the `default` network will be used. | |
available_maintenance_versions | jsonb | The available maintenance versions that an instance could update to. | |
connect_mode | bigint | The network connect mode of the Redis instance. | |
create_time | timestamp with time zone | The time the instance was created. | |
current_location_id | text | The 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_key | text | The KMS key reference that the customer provides when trying to create the instance. | |
display_name | text | An arbitrary and optional user-provided name for the instance. | |
host | text | Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service. | |
labels | jsonb | Resource labels to represent user provided metadata. | |
location | text | = | The GCP multi-region, region, or zone in which the resource is located. |
location_id | text | The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. | |
maintenance_policy | jsonb | The maintenance policy for the instance. If not provided, maintenance events can be performed at any time. | |
maintenance_schedule | jsonb | Date and time of upcoming maintenance events which have been scheduled. | |
maintenance_version | text | The self service update maintenance version. | |
memory_size_gb | bigint | Redis memory size in GiB. | |
name | text | = | Unique name of the resource in this scope including project and location. |
nodes | jsonb | Info per node. | |
persistence_config | jsonb | Persistence configuration parameters. | |
persistence_iam_identity | text | Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is `serviceAccount:<service_account_email>`. | |
port | bigint | The port number of the exposed Redis endpoint. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
read_endpoint | text | Hostname or IP address of the exposed readonly Redis endpoint. | |
read_endpoint_port | bigint | The port number of the exposed readonly redis endpoint. | |
read_replicas_mode | bigint | Read replicas mode for the instance. | |
redis_configs | jsonb | Redis configuration parameters. | |
redis_version | text | The version of Redis software. | |
replica_count | bigint | The number of replica nodes. | |
reserved_ip_range | text | The reserved IP range for the instnce. | |
secondary_ip_range | text | Additional IP range for node placement. | |
server_ca_certs | jsonb | List of server CA certificates for the instance. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | bigint | The current state of this instance. | |
status_message | text | Additional information about the current status of this instance, if available. | |
suspension_reasons | jsonb | Reasons that causes instance in `SUSPENDED` state. | |
tier | bigint | The service tier of the instance. | |
title | text | Title of the resource. | |
transit_encryption_mode | bigint | The 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