Azure Redis Enterprise Cluster
This page shows how to write Terraform and Azure Resource Manager for Redis Enterprise Cluster and write them securely.
azurerm_redis_enterprise_cluster (Terraform)
The Cluster in Redis Enterprise can be configured in Terraform with the resource name azurerm_redis_enterprise_cluster
. The following sections describe 9 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_redis_enterprise_cluster" "primary" {
name = format("redisgeek-%s", random_string.acre_primary_name.result)
resource_group_name = azurerm_resource_group.resource_group.name
location = random_shuffle.regions-with-az.result[0]
zones = [1, 2, 3]
sku_name = var.acre_sku
resource "azurerm_redis_enterprise_cluster" "abhi-re-1" {
name = "abhi-re-1"
resource_group_name = local.resource_grp_name
location = local.location_0
sku_name = "Enterprise_E20-2"
zones = [2]
resource "azurerm_redis_enterprise_cluster" "redis-enterprise" {
name = var.name
resource_group_name = data.azurerm_resource_group.redis-enterprise.name
location = data.azurerm_resource_group.redis-enterprise.location
sku_name = var.sku_name
}
resource "azurerm_redis_enterprise_cluster" "redislabs" {
name = format("redislabs-%s", random_string.redis_enterprise_name.result)
resource_group_name = azurerm_resource_group.redislabs.name
location = azurerm_resource_group.redislabs.location
zones = [1,2,3]
sku_name = var.acre_sku
resource "azurerm_redis_enterprise_cluster" "redisgeek" {
name = format("redisgeek-%s", random_string.redis_enterprise_name.result)
resource_group_name = azurerm_resource_group.redisgeek.name
location = azurerm_resource_group.redisgeek.location
zones = [1, 2, 3]
sku_name = var.acre_sku
resource "azurerm_redis_enterprise_cluster" "redisgeek" {
name = format("redisgeek-%s", random_string.redis_enterprise_name.result)
resource_group_name = azurerm_resource_group.redisgeek.name
location = azurerm_resource_group.redisgeek.location
zones = [1, 2, 3]
sku_name = var.acre_sku
resource "azurerm_redis_enterprise_cluster" "redisgeek" {
name = format("acrf-%s", var.random_id)
resource_group_name = data.azurerm_resource_group.redisgeek.name
location = data.azurerm_resource_group.redisgeek.location
sku_name = var.acre_sku
tags = data.azurerm_resource_group.redisgeek.tags
resource "azurerm_redis_enterprise_cluster" "redisgeek" {
name = format("acre-%s", var.random_id)
resource_group_name = data.azurerm_resource_group.redisgeek.name
location = data.azurerm_resource_group.redisgeek.location
sku_name = var.acre_sku
tags = data.azurerm_resource_group.redisgeek.tags
resource "azurerm_redis_enterprise_cluster" "redisgeek" {
name = format("redisgeek-%s", random_string.redis_enterprise_name.result)
resource_group_name = azurerm_resource_group.redisgeek.name
location = var.location
zones = [1, 2, 3]
sku_name = var.acre_sku
Parameters
-
hostname
optional computed - string -
id
optional computed - string -
location
required - string -
name
required - string -
resource_group_name
required - string -
sku_name
required - string -
tags
optional - map from string to string -
version
optional computed - string -
zones
optional - list of string -
timeouts
single block
Explanation in Terraform Registry
Manages a Redis Enterprise Cluster.
Microsoft.Cache/redisEnterprise (Azure Resource Manager)
The redisEnterprise in Microsoft.Cache can be configured in Azure Resource Manager with the resource name Microsoft.Cache/redisEnterprise
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-02-01-preview",
"properties": {},
"location": "${location}",
"dependsOn": [],
"sku": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-03-01",
"properties": {},
"location": "${location}",
"dependsOn": [],
"sku": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-02-01-preview",
"name": "${re_name}",
"location": "${location}",
"dependsOn": [],
"tags": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-03-01",
"properties": {},
"location": "${location}",
"dependsOn": [],
"sku": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2020-10-01-preview",
"name": "[variables('redis_enterprise_name')]",
"location": "[variables('location')]",
"tags": "[parameters('resourceTags')]",
"sku": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-02-01-preview",
"properties": {},
"location": "[parameters('Region1')]",
"dependsOn": [],
"sku": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-02-01-preview",
"name": "${re_name_2}",
"location": "${location}",
"dependsOn": [],
"tags": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-02-01-preview",
"name": "${re_name}",
"location": "${location}",
"dependsOn": [],
"tags": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-02-01-preview",
"properties": {},
"location": "[parameters('Region1')]",
"dependsOn": [],
"sku": {
"type": "Microsoft.Cache/redisEnterprise",
"apiVersion": "2021-02-01-preview",
"properties": {},
"location": "[parameters('Region1')]",
"dependsOn": [],
"sku": {
Frequently asked questions
What is Azure Redis Enterprise Cluster?
Azure Redis Enterprise Cluster is a resource for Redis Enterprise of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Redis Enterprise Cluster?
For Terraform, the redisgeek/acre-terraform-cron-replication, bestarch/re and rafaelvelosoAZ/NewOne source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the Redislabs-Solution-Architects/acre-terraform-geo-replication-simple, Redislabs-Solution-Architects/acre-arm and bestarch/re-aa source code examples are useful. See the Azure Resource Manager Example section for further details.