MP.AZR.1034 Enable blob soft delete and supported versioning for Storage accounts
Applicable Azure Storage blob services should enable blob soft delete and, where supported, blob versioning to help recover from accidental deletion or modification. This custom test checks service configuration. Versioning is not evaluated for hierarchical-namespace accounts or account types where Azure does not support it.
Remediation action:
- In the Azure portal, open the Storage account and select Data protection.
- Enable Enable soft delete for blobs and choose a retention period that meets your recovery requirements.
- For a supported non-hierarchical-namespace account, also enable Enable versioning for blobs.
- Confirm the selected account type supports the settings before changing its configuration.
Using Azure CLI:
az storage account blob-service-properties update --account-name <name> --resource-group <resource-group> --enable-delete-retention true --delete-retention-days 7 --enable-versioning true
Related links
%TestResult%