Redis cache should have patch schedule configured

Medium Azure General patchschedules-redis-cache-patch-schedule

Applies to

  • Microsoft.Cache/redis/patchSchedules

What CGPulse checks

A resource passes this rule when scheduleEntriesCount must be greater than 0. Anything else is reported as a finding with the evaluated property value attached as evidence.

How to fix it

Configure a patch schedule to ensure security updates are applied during maintenance windows. In Azure Portal: Redis Cache > Patch schedule > Add schedule entry. See: https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-administration#schedule-updates

CLI

az redis patch-schedule create --ids "{id}" --schedule-entries "[{dayOfWeek:Saturday,startHourUtc:2,maintenanceWindow:PT5H}]"

Bicep

resource patchSchedule 'Microsoft.Cache/redis/patchSchedules@2023-08-01' = {
  name: 'default'
  parent: redisCache
  properties: {
    scheduleEntries: [{
      dayOfWeek: 'Saturday'
      startHourUtc: 2
      maintenanceWindow: 'PT5H'
    }]
  }
}

Terraform

resource "azurerm_redis_cache" "{name}" {
  name                = "{name}"
  resource_group_name = "{rg}"
  location            = var.location
  capacity            = 0
  family              = "C"
  sku_name            = "Basic"
  patch_schedule {
    day_of_week        = "Saturday"
    start_hour_utc     = 2
    maintenance_window = "PT5H"
  }
}

Compliance frameworks

Is your environment compliant with this rule?

CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.

Run a free scan

Related Azure rules

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.