Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The Redis resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Cache/Redis resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Cache/Redis@2016-04-01' = {
location: 'string'
name: 'string'
properties: {
enableNonSslPort: bool
redisConfiguration: {
{customized property}: 'string'
}
shardCount: int
sku: {
capacity: int
family: 'string'
name: 'string'
}
staticIP: 'string'
subnetId: 'string'
tenantSettings: {
{customized property}: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Cache/Redis
Name | Description | Value |
---|---|---|
location | Resource location. | string (required) |
name | The resource name | string (required) |
properties | Redis cache properties. | RedisCreatePropertiesOrRedisResourceProperties (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
RedisCreatePropertiesOrRedisResourceProperties
Name | Description | Value |
---|---|---|
enableNonSslPort | Specifies whether the non-ssl Redis server port (6379) is enabled. | bool |
redisConfiguration | All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. | RedisPropertiesRedisConfiguration |
shardCount | The number of shards to be created on a Premium Cluster Cache. | int |
sku | The SKU of the Redis cache to deploy. | Sku (required) |
staticIP | Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. | string Constraints: Pattern = ^\d+\.\d+\.\d+\.\d+$ |
subnetId | The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 | string Constraints: Pattern = ^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$ |
tenantSettings | tenantSettings | RedisPropertiesTenantSettings |
RedisPropertiesRedisConfiguration
Name | Description | Value |
---|
RedisPropertiesTenantSettings
Name | Description | Value |
---|
ResourceTags
Name | Description | Value |
---|
Sku
Name | Description | Value |
---|---|---|
capacity | The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). | int (required) |
family | The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). | 'C' 'P' (required) |
name | The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium) | 'Basic' 'Premium' 'Standard' (required) |
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Redis Cache | AVM Resource Module for Redis Cache |
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
Bicep File | Description |
---|---|
Create a Premium Redis Cache with clustering | This template shows how to configure clustering in a premium Azure Redis Cache instance. |
Create a Redis Cache using a template | This template creates an Azure Redis Cache with diagnostics data kept in a storage account. |
Create a Redis Cache with Microsoft Entra Authentication. | This template creates a Redis Cache. Then assigns a built-in access policy to a redis user. Then creates a custom access policy. And then assigns the custom access policy to another Redis user. |
Create a Web App plus Redis Cache using a template | This template creates an Azure Web App with Redis cache. |
Create Premium Redis Cache deployed into a Virtual Network | This template shows how to deploy a premium Azure Redis Cache instance into an existing Virtual Network |
Create Premium Redis Cache with data persistence | This template shows how to configure persistence in a premium Azure Redis Cache instance. |
Deploy API Management with an external Azure Cache for Redis | This template demonstrates how to create an instance of Azure API Management in the Consumption tier with an external Azure Cache for Redis instance as the API Management external cache. |
ARM template resource definition
The Redis resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Cache/Redis resource, add the following JSON to your template.
{
"type": "Microsoft.Cache/Redis",
"apiVersion": "2016-04-01",
"name": "string",
"location": "string",
"properties": {
"enableNonSslPort": "bool",
"redisConfiguration": {
"{customized property}": "string"
},
"shardCount": "int",
"sku": {
"capacity": "int",
"family": "string",
"name": "string"
},
"staticIP": "string",
"subnetId": "string",
"tenantSettings": {
"{customized property}": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Cache/Redis
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2016-04-01' |
location | Resource location. | string (required) |
name | The resource name | string (required) |
properties | Redis cache properties. | RedisCreatePropertiesOrRedisResourceProperties (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.Cache/Redis' |
RedisCreatePropertiesOrRedisResourceProperties
Name | Description | Value |
---|---|---|
enableNonSslPort | Specifies whether the non-ssl Redis server port (6379) is enabled. | bool |
redisConfiguration | All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. | RedisPropertiesRedisConfiguration |
shardCount | The number of shards to be created on a Premium Cluster Cache. | int |
sku | The SKU of the Redis cache to deploy. | Sku (required) |
staticIP | Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. | string Constraints: Pattern = ^\d+\.\d+\.\d+\.\d+$ |
subnetId | The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 | string Constraints: Pattern = ^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$ |
tenantSettings | tenantSettings | RedisPropertiesTenantSettings |
RedisPropertiesRedisConfiguration
Name | Description | Value |
---|
RedisPropertiesTenantSettings
Name | Description | Value |
---|
ResourceTags
Name | Description | Value |
---|
Sku
Name | Description | Value |
---|---|---|
capacity | The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). | int (required) |
family | The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). | 'C' 'P' (required) |
name | The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium) | 'Basic' 'Premium' 'Standard' (required) |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
Template | Description |
---|---|
Create a Premium Redis Cache with clustering |
This template shows how to configure clustering in a premium Azure Redis Cache instance. |
Create a Redis Cache using a template |
This template creates an Azure Redis Cache with diagnostics data kept in a storage account. |
Create a Redis Cache with Microsoft Entra Authentication. |
This template creates a Redis Cache. Then assigns a built-in access policy to a redis user. Then creates a custom access policy. And then assigns the custom access policy to another Redis user. |
Create a Web App + Redis Cache + SQL DB with a template |
This template creates an Azure Web App with Redis cache and a SQL Database. |
Create a Web App plus Redis Cache using a template |
This template creates an Azure Web App with Redis cache. |
Create Premium Redis Cache deployed into a Virtual Network |
This template shows how to deploy a premium Azure Redis Cache instance into an existing Virtual Network |
Create Premium Redis Cache with data persistence |
This template shows how to configure persistence in a premium Azure Redis Cache instance. |
Create two geo-replicated caches in a Virtual Network |
This template shows how to deploy two Premium tier Azure Cache for Redis instances into separate Virtual Networks and link them with geo-replication. |
Deploy API Management with an external Azure Cache for Redis |
This template demonstrates how to create an instance of Azure API Management in the Consumption tier with an external Azure Cache for Redis instance as the API Management external cache. |
eShop Website with ILB ASE |
An App Service Environment is a Premium service plan option of Azure App Service that provides a fully isolated and dedicated environment for securely running Azure App Service apps at high scale, including Web Apps, Mobile Apps, and API Apps. |
Scalable Umbraco CMS Web App |
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps. |
Terraform (AzAPI provider) resource definition
The Redis resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Cache/Redis resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Cache/Redis@2016-04-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
enableNonSslPort = bool
redisConfiguration = {
{customized property} = "string"
}
shardCount = int
sku = {
capacity = int
family = "string"
name = "string"
}
staticIP = "string"
subnetId = "string"
tenantSettings = {
{customized property} = "string"
}
}
}
}
Property Values
Microsoft.Cache/Redis
Name | Description | Value |
---|---|---|
location | Resource location. | string (required) |
name | The resource name | string (required) |
properties | Redis cache properties. | RedisCreatePropertiesOrRedisResourceProperties (required) |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Cache/Redis@2016-04-01" |
RedisCreatePropertiesOrRedisResourceProperties
Name | Description | Value |
---|---|---|
enableNonSslPort | Specifies whether the non-ssl Redis server port (6379) is enabled. | bool |
redisConfiguration | All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. | RedisPropertiesRedisConfiguration |
shardCount | The number of shards to be created on a Premium Cluster Cache. | int |
sku | The SKU of the Redis cache to deploy. | Sku (required) |
staticIP | Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. | string Constraints: Pattern = ^\d+\.\d+\.\d+\.\d+$ |
subnetId | The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 | string Constraints: Pattern = ^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$ |
tenantSettings | tenantSettings | RedisPropertiesTenantSettings |
RedisPropertiesRedisConfiguration
Name | Description | Value |
---|
RedisPropertiesTenantSettings
Name | Description | Value |
---|
ResourceTags
Name | Description | Value |
---|
Sku
Name | Description | Value |
---|---|---|
capacity | The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). | int (required) |
family | The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). | 'C' 'P' (required) |
name | The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium) | 'Basic' 'Premium' 'Standard' (required) |
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Redis Cache | AVM Resource Module for Redis Cache |