22 Platform / platform.22innovalabs.com
Azure · Compute · Module

Backup for Azure VMs, the way the Well‑Architected Framework recommends.

A single, vetted Bicep module that provisions a Recovery Services Vault, an Enhanced (V2) backup policy with long‑term retention, and registers any number of VMs as protected items. Production defaults out of the box. Drop it into your pipeline and ship.

Status Verified
Version 1.0.0
Updated 2026‑04‑29
Language Bicep
Owner #cloud‑platform
Jump to code

What this module deploys

Three resource families, one orchestrator. Idempotent — re-running adds new VMs without touching existing ones.

RECOVERY SERVICES VAULT rsv-shared-prod ● GRS · Always‑On soft delete · CRR BACKUP POLICY · V2 Daily · LTR 30/12/12/5 Instant restore: 7d VM app‑01 protected VM app‑02 protected VM db‑01 protected …N LOG ANALYTICS Diagnostics all logs · all metrics (optional)

Well‑Architected alignment

Defaults are tuned for production. Every safeguard below is on by default — opt out, don't opt in.

PillarDefault behaviorOverride
ReliabilityGeoRedundant storage with Cross‑Region Restore enabled.vaultStorageRedundancy
ReliabilityLong‑term retention: 30 daily / 12 weekly / 12 monthly / 5 yearly.dailyRetentionDays …
ReliabilityEnhanced (V2) policy — supports Trusted Launch and 30‑day instant restore.instantRpRetentionDays
SecurityAlways‑On enhanced soft‑delete (cannot be disabled later).softDeleteRetentionInDays
SecurityImmutability enabled (Unlocked → flip to Locked once verified).immutabilityState
SecuritySystem‑assigned managed identity on the vault.
SecurityPublic network access toggle for Private Endpoint scenarios.publicNetworkAccess
Operational ExcellenceDiagnostic settings (all logs + metrics) to Log Analytics.logAnalyticsWorkspaceId
Operational ExcellenceTags applied to every resource.tags
Cost OptimizationTiering set to DoNotTier — opt into archive when retention > 3 months.edit policy module

Quick start

Three steps. The whole thing is parameterized — most teams only edit the main.bicepparam file.

  1. Download or clone the module

    Use the Download all files button at the top, or pull it from the internal Bicep registry once published.

  2. Edit main.bicepparam

    Set vaultName, your vmsToProtect array, and tags. Everything else has sensible production defaults.

  3. Validate, then deploy

    Run a what-if first; deploy when the plan looks right.

    $ azure-cli
    1# Validate2az deployment group what-if \3  --resource-group rg-platform-rsv \4  --template-file main.bicep \5  --parameters main.bicepparam67# Deploy8az deployment group create \9  --resource-group rg-platform-rsv \10  --template-file main.bicep \11  --parameters main.bicepparam

Files

Six files. Click a tab to view, copy, or download an individual file. Use the button in the hero to grab everything as a ZIP.


      

Parameters reference

All inputs to main.bicep. Defaults shown — override in your .bicepparam file.

NameTypeDefaultDescription
locationstringresourceGroup().locationRegion for the vault and policy.
vaultNamestringRecovery Services Vault name. Required.
vaultStorageRedundancystring'GeoRedundant'LRS / ZRS / GRS. Use GRS for production.
enableCrossRegionRestorebooltrueRequires GRS. Cannot be disabled later.
softDeleteRetentionInDaysint1414–180 days. Increase for sensitive workloads.
immutabilityStatestring'Unlocked'Disabled / Unlocked / Locked. Locked is irreversible.
publicNetworkAccessstring'Enabled'Set to Disabled when fronting with Private Endpoint.
logAnalyticsWorkspaceIdstring''Resource ID of LAW for diagnostics. Empty = skip.
backupPolicyNamestring'bp-vm-daily-enhanced'Name of the V2 policy created.
dailyBackupTimestring'22:00'HH:mm in the policy time zone.
timeZonestring'UTC'Schedule time zone (e.g. 'Eastern Standard Time').
dailyRetentionDaysint30Daily recovery points to keep.
weeklyRetentionWeeksint12Weekly RPs (Sunday).
monthlyRetentionMonthsint12Monthly RPs (1st Sunday).
yearlyRetentionYearsint5Yearly RPs (1st Sunday of January).
instantRpRetentionDaysint7Snapshot retention. V2 supports up to 30.
vmsToProtectarray[]Each: { name, resourceGroup, subscriptionId? }.
tagsobject{ workload, managedBy, costCenter }Applied to every resource.

Hardening for production

Run through this list before declaring the vault production‑ready.

  • Lock immutabilityOnce the policy is reviewed and stable, set immutabilityState = 'Locked'. This is irreversible — verify first.
  • Disable public network accessSet publicNetworkAccess = 'Disabled' and front the vault with a Private Endpoint in your hub network.
  • Extend soft‑delete windowIncrease softDeleteRetentionInDays to 30–90 for regulated workloads.
  • Enable Multi‑User Authorization (MUA)Associate the vault with a Resource Guard in a separate subscription so destructive operations require a second approver.
  • Enforce with Azure PolicyAssign built‑ins: "Azure Backup should be enabled for VMs", "RSV should use private link", "Soft delete should be enabled on RSV".
  • Wire alertsAdd alerts for backup job failures, retention drift, and unauthorized policy changes through the diagnostic settings already configured.

Owners & support

Maintained by
Cloud Platform Team
Slack channel
#cloud-platform
On‑call
PagerDuty › cloud-platform
SLA
P2 · 1 business day

Changelog

1.0.0
2026‑04‑29
Initial release. Vault, Enhanced (V2) policy, VM protection loop, optional diagnostics.