Description
Azure Cache for Redis receives updates without a custom schedule. To place routine maintenance for the Premium cache in a quieter period, set the day and UTC start hour in patch_schedule.
Potential impact
Maintenance can interrupt connections or slow requests. Clients that fail to reconnect may extend the outage.
Remediation
Monitor maintenance notifications and update status, and test client retries and reconnection. Urgent security updates and some platform operations can occur outside the window.
Examples
The excerpts use AzureRM 3.117.1. Supply the referenced resource group and dedicated subnet, and check argument names if using a different provider version.
Before
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
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
}
}
The second example starts the window at 07:00 UTC on Thursdays. An update runs when one is needed.