Microsoft.Cache redis
The redis resource type can be deployed to: Resource groups.
To learn about resource group deployments, see Bicep or ARM template.
For a list of changed properties in each API version, see change log.
Template format
To create a Microsoft.Cache/redis resource, add the following Bicep or JSON to your template.
resource symbolicname 'Microsoft.Cache/redis@2021-06-01' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
identity: {
type: 'string'
userAssignedIdentities: {}
}
properties: {
enableNonSslPort: bool
minimumTlsVersion: 'string'
publicNetworkAccess: 'string'
redisConfiguration: {
'aof-storage-connection-string-0': 'string'
'aof-storage-connection-string-1': 'string'
'maxfragmentationmemory-reserved': 'string'
'maxmemory-delta': 'string'
'maxmemory-policy': 'string'
'maxmemory-reserved': 'string'
'rdb-backup-enabled': 'string'
'rdb-backup-frequency': 'string'
'rdb-backup-max-snapshot-count': 'string'
'rdb-storage-connection-string': 'string'
}
redisVersion: 'string'
replicasPerMaster: int
replicasPerPrimary: int
shardCount: int
sku: {
capacity: int
family: 'string'
name: 'string'
}
staticIP: 'string'
subnetId: 'string'
tenantSettings: {}
}
zones: [
'string'
]
}
Property values
redis
| Name | Description | Value |
|---|---|---|
| type | The resource type For Bicep, set this value in the resource declaration. |
'Microsoft.Cache/redis' |
| apiVersion | The resource api version For Bicep, set this value in the resource declaration. |
'2021-06-01' |
| name | The resource name | string (required) |
| location | The geo-location where the resource lives | string (required) |
| tags | Resource tags. | Dictionary of tag names and values. See Tags in templates |
| identity | The identity of the resource. | ManagedServiceIdentity |
| properties | Redis cache properties. | RedisCreatePropertiesOrRedisProperties (required) |
| zones | A list of availability zones denoting where the resource needs to come from. | string[] |
ManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | 'None' 'SystemAssigned' 'SystemAssigned, UserAssigned' 'UserAssigned' |
| userAssignedIdentities | The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. | object |
RedisCreatePropertiesOrRedisProperties
| Name | Description | Value |
|---|---|---|
| enableNonSslPort | Specifies whether the non-ssl Redis server port (6379) is enabled. | bool |
| minimumTlsVersion | Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2') | '1.0' '1.1' '1.2' |
| publicNetworkAccess | Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' | 'Disabled' 'Enabled' |
| 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. | RedisCommonPropertiesRedisConfiguration |
| redisVersion | Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6) | string |
| replicasPerMaster | The number of replicas to be created per primary. | int |
| replicasPerPrimary | The number of replicas to be created per primary. | int |
| 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. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. | string |
| 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 |
| tenantSettings | A dictionary of tenant settings | object |
RedisCommonPropertiesRedisConfiguration
| Name | Description | Value |
|---|---|---|
| aof-storage-connection-string-0 | First storage account connection string | string |
| aof-storage-connection-string-1 | Second storage account connection string | string |
| maxfragmentationmemory-reserved | Value in megabytes reserved for fragmentation per shard | string |
| maxmemory-delta | Value in megabytes reserved for non-cache usage per shard e.g. failover. | string |
| maxmemory-policy | The eviction strategy used when your data won't fit within its memory limit. | string |
| maxmemory-reserved | Value in megabytes reserved for non-cache usage per shard e.g. failover. | string |
| rdb-backup-enabled | Specifies whether the rdb backup is enabled | string |
| rdb-backup-frequency | Specifies the frequency for creating rdb backup | string |
| rdb-backup-max-snapshot-count | Specifies the maximum number of snapshots for rdb backup | string |
| rdb-storage-connection-string | The storage account connection string for storing rdb file | string |
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' |
| name | The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium) | 'Basic' 'Premium' 'Standard' |
Quickstart templates
The following quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Scalable Umbraco CMS Web App |
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps. |
| 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. |
| Create a Redis Cache using a template |
This template creates an Azure Redis Cache with diagnostics data kept in a storage account. |
| Create a Premium Redis Cache with clustering |
This template shows how to configure clustering in a premium Azure Redis Cache instance. |
| Create Premium Redis Cache with data persistence |
This template shows how to configure persistence in a premium Azure Redis Cache instance. |
| 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 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. |
| 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. |