Table: azure_redis_cache - Query Azure Redis Cache using SQL
Azure Redis Cache is a fully managed, in-memory cache that enables high-performance and scalable architectures. It uses the popular open-source Redis data structure store, which supports a variety of data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, and more. It's a part of Azure's suite of database services, providing a reliable and secure Redis cache environment.
Table Usage Guide
The azure_redis_cache
table provides insights into each Azure Redis Cache resource within your Azure environment. As a database administrator or developer, you can use this table to gain a comprehensive overview of your Redis Cache resources, including their names, locations, associated resource groups, and subscriptions. This information can be instrumental in optimizing your cache usage, managing resources, and planning capacity.
Examples
Basic info
Explore the details of your Azure Redis Cache instances to understand their current status, region, and version. This can help you manage your resources effectively and ensure they are correctly provisioned and operating in the expected regions.
select name, redis_version, provisioning_state, port, sku_name, region, subscription_idfrom azure_redis_cache;
select name, redis_version, provisioning_state, port, sku_name, region, subscription_idfrom azure_redis_cache;
List cache servers not using latest TLS protocol
Identify instances where your cache servers are not utilizing the latest TLS protocol. This can be particularly useful for maintaining high security standards and ensuring data protection.
select name, region, resource_group, minimum_tls_versionfrom azure_redis_cachewhere minimum_tls_version is null or minimum_tls_version <> '1.2';
select name, region, resource_group, minimum_tls_versionfrom azure_redis_cachewhere minimum_tls_version is null or minimum_tls_version <> '1.2';
List cache servers with in-transit encryption disabled
Explore which cache servers are potentially vulnerable by identifying those with in-transit encryption disabled. This is crucial for enhancing your data security by ensuring all cache servers are encrypted.
select name, region, resource_group, enable_non_ssl_portfrom azure_redis_cachewhere enable_non_ssl_port;
select name, region, resource_group, enable_non_ssl_portfrom azure_redis_cachewhere enable_non_ssl_port = 1;
List premium cache servers
Discover the segments that utilize premium cache servers in Azure, enabling you to understand your resource distribution and manage costs effectively. This is particularly useful when assessing your premium services usage across different regions and resource groups.
select name, region, resource_group, sku_namefrom azure_redis_cachewhere sku_name = 'Premium';
select name, region, resource_group, sku_namefrom azure_redis_cachewhere sku_name = 'Premium';
Control examples
- All Controls > Redis > Azure Cache for Redis should reside within a virtual network
- All Controls > Redis > Redis Caches 'Minimum TLS version' should be set to 'Version 1.2'
- Azure Cache for Redis should use private link
- Azure Cache for Redis should use standard SKUs as a minimum
- Only secure connections to your Azure Cache for Redis should be enabled
Schema for azure_redis_cache
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
access_keys | jsonb | The keys of the Redis cache. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cloud_environment | text | The Azure Cloud Environment. | |
enable_non_ssl_port | boolean | Specifies whether the non-ssl Redis server port (6379) is enabled. | |
host_name | text | Specifies the name of the redis host. | |
id | text | The unique id identifying the resource in subscription. | |
instances | jsonb | A list of the Redis instances associated with the cache. | |
linked_servers | jsonb | A list of the linked servers associated with the cache. | |
minimum_tls_version | text | Specifies the TLS version requires to connect. | |
name | text | = | The name of the resource. |
port | bigint | Specifies the redis non-SSL port. | |
private_endpoint_connections | jsonb | A list of private endpoint connection associated with the specified redis cache. | |
provisioning_state | text | The provisioning state of the redis instance at the time the operation was called. Valid values are: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded', 'Unlinking', 'Unprovisioning', and 'Updating'. | |
public_network_access | text | Indicates whether or not public endpoint access is allowed for this cache. Valid values are: 'Enabled', 'Disabled'. | |
redis_configuration | jsonb | Describes the redis cache configuration. | |
redis_version | text | Specifies the version. | |
region | text | The Azure region/location in which the resource is located. | |
replicas_per_master | bigint | The number of replicas to be created per master. | |
resource_group | text | = | The resource group which holds this resource. |
shard_count | bigint | The number of shards to be created on a premium cluster cache. | |
sku_capacity | bigint | The size of the Redis cache to deploy. | |
sku_family | text | The SKU family to use. | |
sku_name | text | The type of Redis cache to deploy. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
ssl_port | bigint | Specifies the redis SSL port. | |
static_ip | inet | Specifies the statis IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. | |
subnet_id | text | The full resource ID of a subnet in a virtual network to deploy the Redis cache in. | |
subscription_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Azure Subscription ID in which the resource is located. |
tags | jsonb | A map of tags for the resource. | |
tenant_settings | jsonb | A dictionary of tenant settings. | |
title | text | Title of the resource. | |
type | text | The type of the resource. | |
zones | jsonb | A list of availability zones denoting where the resource needs to come from. |
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)" -- azure
You can pass the configuration to the command with the --config
argument:
steampipe_export_azure --config '<your_config>' azure_redis_cache