title | description | author | ms.author | ms.service | ms.topic | ms.custom | ms.date |
---|---|---|---|---|---|---|---|
Deploy Azure Cache for Redis by using Azure Resource Manager template |
Learn how to use an Azure Resource Manager template (ARM template) to deploy an Azure Cache for Redis resource. Templates are provided for common scenarios. |
flang-msft |
franlanglois |
cache |
conceptual |
subject-armqs, devx-track-azurepowershell |
04/28/2021 |
Learn how to create an Azure Resource Manager template (ARM template) that deploys an Azure Cache for Redis. The cache can be used with an existing storage account to keep diagnostic data. You also learn how to define which resources are deployed and how to define parameters that are specified when the deployment is executed. You can use this template for your own deployments, or customize it to meet your requirements. Currently, diagnostic settings are shared for all caches in the same region for a subscription. Updating one cache in the region affects all other caches in the region.
[!INCLUDE About Azure Resource Manager]
If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to Azure button. The template will open in the Azure portal.
- Azure subscription: If you don't have an Azure subscription, create a free account before you begin.
- A storage account: To create one, see Create an Azure Storage account. The storage account is used for diagnostic data.
The template used in this quickstart is from Azure Quickstart Templates.
:::code language="json" source="~/quickstart-templates/quickstarts/microsoft.cache/redis-cache/azuredeploy.json":::
The following resources are defined in the template:
Resource Manager templates for the new Premium tier are also available.
- Create a Premium Azure Cache for Redis with clustering
- Create Premium Azure Cache for Redis with data persistence
- Create Premium Redis Cache deployed into a Virtual Network
To check for the latest templates, see Azure Quickstart Templates and search for Azure Cache for Redis.
-
Select the following image to sign in to Azure and open the template.
-
Select or enter the following values:
- Subscription: select an Azure subscription used to create the data share and the other resources.
- Resource group: select Create new to create a new resource group or select an existing resource group.
- Location: select a location for the resource group. The storage account and the Redis cache must be in the same region. By default the Redis cache uses the same location as the resource group. So, specify the same location as the storage account.
- Redis Cache Name: enter a name for the Redis cache.
- Existing Diagnostics Storage Account: enter the resource ID of a storage account. The syntax is
/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.Storage/storageAccounts/<STORAGE ACCOUNT NAME>
.
Use the default value for the rest of the settings.
-
select I agree to the terms and conditions stated above, and the select Purchase.
- Sign in to the Azure portal.
- Open the Redis cache that you created.
When no longer needed, delete the resource group, which deletes the resources in the resource group.
$resourceGroupName = Read-Host -Prompt "Enter the resource group name"
Remove-AzResourceGroup -Name $resourceGroupName
Write-Host "Press [ENTER] to continue..."
In this tutorial, you learnt how to create an Azure Resource Manager template that deploys an Azure Cache for Redis. To learn how to create an Azure Resource Manager template that deploys an Azure Web App with Azure Cache for Redis, see Create a Web App plus Azure Cache for Redis using a template.