Azure Redis Enterprise Database

This page shows how to write Terraform and Azure Resource Manager for Redis Enterprise Database and write them securely.

azurerm_redis_enterprise_database (Terraform)

The Database in Redis Enterprise can be configured in Terraform with the resource name azurerm_redis_enterprise_database. The following sections describe 9 examples of how to use the resource and its parameters.

Example Usage from GitHub

azurerm_redis_enterprise_database.tf#L1
resource "azurerm_redis_enterprise_database" "primary" {
  name                = "default"
  resource_group_name = azurerm_resource_group.resource_group.name
  cluster_id          = azurerm_redis_enterprise_cluster.primary.id
  clustering_policy   = var.acre_cluster_policy
}
re.tf#L17
resource "azurerm_redis_enterprise_database" "abhi-db-1" {
  name                = "default"
  resource_group_name = local.resource_grp_name
  cluster_id          = azurerm_redis_enterprise_cluster.abhi-re-1.id
  client_protocol     = "Plaintext"
  clustering_policy   = "EnterpriseCluster"
main.tf#L13
resource "azurerm_redis_enterprise_database" "redis-enterprise" {
  resource_group_name = data.azurerm_resource_group.redis-enterprise.name
  clustering_policy   = "EnterpriseCluster"
  cluster_id          = azurerm_redis_enterprise_cluster.redis-enterprise.id
  eviction_policy     = "NoEviction"
  client_protocol     = "Plaintext"
azurerm_redis_enterprise_database.tf#L1
resource "azurerm_redis_enterprise_database" "redisgeek" {
  name                = "default"
  resource_group_name = azurerm_resource_group.redisgeek.name
  cluster_id          = azurerm_redis_enterprise_cluster.redisgeek.id
  clustering_policy   = var.azure_redis_enterprise_database_clustering_policy
}
azurerm_redis_enterprise_database.tf#L1
resource "azurerm_redis_enterprise_database" "redisgeek" {
  name                = "default"
  resource_group_name = azurerm_resource_group.redisgeek.name
  cluster_id          = azurerm_redis_enterprise_cluster.redisgeek.id
  clustering_policy   = var.azure_redis_enterprise_database_clustering_policy
  module {
azurerm_redis_enterprise_database.tf#L1
resource "azurerm_redis_enterprise_database" "redislabs" {
  name = "default"
  resource_group_name = azurerm_resource_group.redislabs.name
  cluster_id = azurerm_redis_enterprise_cluster.redislabs.id
  clustering_policy = var.azure_redis_enterprise_database_clustering_policy
  module {
azurerm_redis_enterprise_database.tf#L1
resource "azurerm_redis_enterprise_database" "redisgeek" {
  name                = "default"
  resource_group_name = azurerm_resource_group.redisgeek.name
  cluster_id          = azurerm_redis_enterprise_cluster.redisgeek.id
  clustering_policy   = var.azure_redis_enterprise_database_clustering_policy
}
azurerm_redis_enterprise_database.tf#L1
resource "azurerm_redis_enterprise_database" "redisgeek" {
  name                = "default"
  resource_group_name = data.azurerm_resource_group.redisgeek.name
  cluster_id          = azurerm_redis_enterprise_cluster.redisgeek.id
  clustering_policy   = var.azure_redis_enterprise_database_clustering_policy
azurerm_redis_enterprise_database.tf#L1
resource "azurerm_redis_enterprise_database" "redisgeek" {
  name                = "default"
  resource_group_name = data.azurerm_resource_group.redisgeek.name
  cluster_id          = azurerm_redis_enterprise_cluster.redisgeek.id
  clustering_policy   = var.azure_redis_enterprise_database_clustering_policy

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Redis Enterprise Database.

Microsoft.Cache/redisEnterprise/databases (Azure Resource Manager)

The redisEnterprise/databases in Microsoft.Cache can be configured in Azure Resource Manager with the resource name Microsoft.Cache/redisEnterprise/databases. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Frequently asked questions

What is Azure Redis Enterprise Database?

Azure Redis Enterprise Database 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 Database?

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.