Review the Azure Redis maintenance schedule

Prepare a maintenance window and connection recovery for automatic updates.

Description

Azure Cache for Redis receives updates even without a custom patch_schedule. Without a maintenance window, updates can occur at an inconvenient time. The schedule controls supported maintenance timing; it does not guarantee the timing of every platform operation or urgent security update.

Potential impact

  • Updates during busy periods can affect connections or performance.
  • Maintenance can have greater impact when applications cannot recover connections.

Remediation

Choose the patch_schedule day and UTC start hour for operational needs. Prefer a low-traffic period and verify client reconnection and retry behavior. Monitor maintenance notices and update status, while preparing for urgent updates outside the selected window.

Examples

These existing examples use AzureRM 3.117.1 syntax. Configure referenced resources and the dedicated subnet separately. Some argument names differ in newer providers, so use the documentation for your version.

Before

hcl
resource "azurerm_redis_cache" "example" {
  name                = "timeout-redis"
  location            = "West Europe"
  resource_group_name = azurerm_resource_group.example_rg.name
  subnet_id           = azurerm_subnet.example_redis_snet.id

  family              = "P"
  capacity            = 1
  sku_name            = "Premium"
  shard_count         = 1

  enable_non_ssl_port = false
  minimum_tls_version = "1.2"

  redis_configuration {
    enable_authentication = true
    maxmemory_policy      = "volatile-lru"
  }
}

After

hcl
resource "azurerm_redis_cache" "example" {
  name                = "timeout-redis"
  location            = "West Europe"
  resource_group_name = azurerm_resource_group.example_rg.name
  subnet_id           = azurerm_subnet.example_redis_snet.id

  family              = "P"
  capacity            = 1
  sku_name            = "Premium"
  shard_count         = 1

  enable_non_ssl_port = false
  minimum_tls_version = "1.2"

  redis_configuration {
    enable_authentication = true
    maxmemory_policy      = "volatile-lru"
  }

  patch_schedule {
    day_of_week    = "Thursday"
    start_hour_utc = 7
  }
}

Automatic updates still occur in the before example. The after example starts the maintenance window at 07:00 UTC on Thursday; it does not mean an update must occur every week.

References