This module creates and manages Azure Managed Redis instances. Key features:

  • flexible caching configuration
  • clustering
  • networking
  • high availability

NOTE: This module is meant to be used with an already created resource group

The module follows Azure naming conventions. Name variables passed to the module are only suffixes used in the full resource names that are defined by Azure standards

Abbreviations are used for resource names in most cases, based on these Azure recommendations

Managed Redis supports networking integration, the Virtual Network (VNet) is meant to be already created. There is available option with an integration via the private endpoint; the module manages all required resource internally to satisfy all requirements for this approach

Log in to Corewide IaC registry

Once you have a Corewide Solutions Portal account, this one-time action will use your browser session to retrieve credentials:

 shellterraform login solutions.corewide.com
Provision instructions

Initialize mandatory providers:

Copy and paste into your Terraform configuration and insert the variables:

 hclmodule "tf_azure_cache" {
  source  = "solutions.corewide.com/azure/tf-azure-cache/azurerm"
  version = "~> 3.0.0"

  # specify module inputs here or try one of the examples below
  ...
}

Initialize the setup:

 shellterraform init
Define update strategy

Corewide DevOps team strictly follows Semantic Versioning Specification to provide our clients with products that have predictable upgrades between versions. We recommend pinning patch versions of our modules using pessimistic constraint operator (~>) to prevent breaking changes during upgrades.

To get new features during the upgrades (without breaking compatibility), use ~> 3.0 and run terraform init -upgrade

For the safest setup, use strict pinning with version = "3.0.0"

Azure Managed Redis

Redis cache management in Azure
Module
15% off
$700
$595
TOTAL $595
BUY
v3.0.0 released 2 weeks, 4 days ago
New version approx. every 20 weeks

This module creates and manages Azure Managed Redis instances. Key features:

  • flexible caching configuration
  • clustering
  • networking
  • high availability

NOTE: This module is meant to be used with an already created resource group

The module follows Azure naming conventions. Name variables passed to the module are only suffixes used in the full resource names that are defined by Azure standards

Abbreviations are used for resource names in most cases, based on these Azure recommendations

Managed Redis supports networking integration, the Virtual Network (VNet) is meant to be already created. There is available option with an integration via the private endpoint; the module manages all required resource internally to satisfy all requirements for this approach

Minimal setup with required parameters only:

 hclresource "azurerm_resource_group" "foo" {
  name     = "foo"
  location = "eastus"
}

module "redis" {
  source  = "solutions.corewide.com/azure/tf-azure-cache/azurerm"
  version = "~> 3.0"

  name_suffix         = "bar"
  region              = azurerm_resource_group.foo.location
  resource_group_name = azurerm_resource_group.foo.name
}

Setup with specific machine size, high availability enabled, and auth-less access from the VNet:

 hclresource "azurerm_resource_group" "foo" {
  name     = "foo"
  location = "eastus"
}

module "redis" {
  source  = "solutions.corewide.com/azure/tf-azure-cache/azurerm"
  version = "~> 3.0"

  name_suffix               = "bar"
  region                    = azurerm_resource_group.foo.location
  resource_group_name       = azurerm_resource_group.foo.name
  machine_size              = "Balanced_B5"
  vnet_id                   = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1"
  subnet_id                 = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1"
  public_access_enabled     = false
  high_availability_enabled = true

  redis_configuration = {
    authentication_enabled = false
  }
}
Variable Description Type Default Required Sensitive
name_suffix Name suffix for the created resources string yes no
region Azure region where the managed Redis will be created string yes no
resource_group_name Name of the resource group where managed Redis will be created string yes no
high_availability_enabled Whether to enable high availability for the managed Redis instance bool false no no
machine_size The size of the managed Redis to deploy - SKU name string Balanced_B0 no no
public_access_enabled Toggle public network availability bool true no no
redis_configuration Redis default database configuration parameters object {} no no
redis_configuration.authentication_enabled Whether access key authentication is enabled for the Redis database bool true no no
redis_configuration.client_protocol Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are: Encrypted and Plaintext string Encrypted no no
redis_configuration.clustering_policy Clustering policy specified at create time. Possible values are EnterpriseCluster, OSSCluster, and NoCluster string OSSCluster no no
redis_configuration.eviction_policy Specifies the Redis eviction policy. Possible values are AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom, and NoEviction string NoEviction no no
subnet_id The ID of the subnet which the managed Redis will be pointed to. Both subnet_id and vnet_id are requried for the integration via the private endpoint string no no
tags Tags to be applied to the managed Redis resources map(string) {} no no
vnet_id VNet ID to integrate the managed Redis into. Both vnet_id and subnet_id are requried for the integration via the private endpoint string no no
Output Description Type Sensitive
connection_parameters Connection parameters for managed Redis instance map yes
connection_parameters.port Network port that the managed Redis is listening on map yes
connection_parameters.primary_access_key Primary access key for the managed Redis instance map yes
connection_parameters.private_host Redis instance private hostname accessible from resources within the assigned VNet map yes
connection_parameters.public_host Redis instance public hostname map yes
connection_parameters.secondary_access_key Secondary access key for the managed Redis instance map yes
instance Managed Redis instance attributes resource yes
Dependency Version Kind
terraform >= 1.9 CLI
hashicorp/azurerm ~> 5.0 provider

Not sure where to start?
Let's find your perfect match.