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
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
}
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"
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"
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
}
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 {
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 {
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
}
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
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
Parameters
-
client_protocol
optional - string -
cluster_id
required - string -
clustering_policy
optional - string -
eviction_policy
optional - string -
id
optional computed - string -
name
optional - string -
port
optional - number -
resource_group_name
required - string -
module
list block -
timeouts
single block
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.