Review Recovery Services Vault backup immutability

Protect Recovery Services Vault backups from deletion before retention expires.

Description

Recovery Services vault immutability blocks early deletion and retention reductions that would remove recovery points. It protects supported backups stored in the vault. Operational backups and other resource settings need separate controls.

Potential impact

If immutability is off, ransomware or misuse of deletion permissions can remove the recovery points you need. Restoring the pre-incident state may take longer or be impossible.

Remediation

  • Set immutability = "Unlocked" and test your retention policies and restore procedures. You can still turn protection off at this stage.
  • Consider Locked only after those checks and a review of the operational impact. The lock is irreversible. Keep soft delete and access controls in place.

Examples

The examples use different vault names. When updating an existing vault, keep its actual name and check the Terraform plan for replacement.

Before

hcl
resource "azurerm_recovery_services_vault" "recovery_vault" {
  name                = "app-recovery-vault"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard"
  immutability        = "Disabled"
}

After

hcl
resource "azurerm_recovery_services_vault" "recovery_vault" {
  name                = "protected-recovery-vault"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard"
  immutability        = "Locked"
}

References