Gallery › Backup › Azure built-in policies
[Preview]: Azure Backup should be enabled for Blobs in Storage Accounts
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0-preview Preview
Ensure protection of your Storage Accounts by enabling Azure Backup. Azure Backup is a secure and cost effective data protection solution for Azure.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONStorageAccountBlobs_EnableAzureBackup_Audit.json · 45 lines
{
"properties": {
"displayName": "[Preview]: Azure Backup should be enabled for Blobs in Storage Accounts",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Ensure protection of your Storage Accounts by enabling Azure Backup. Azure Backup is a secure and cost effective data protection solution for Azure.",
"metadata": {
"version": "1.0.0-preview",
"category": "Backup",
"preview": true
},
"version": "1.0.0-preview",
"parameters": {
"effect": {
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"type": "String",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
]
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Storage/storageAccounts"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.DataProtection/backupInstances"
}
}
},
"versions": [
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/4510daf9-5abc-4d7d-a11d-d84416b814f6",
"name": "4510daf9-5abc-4d7d-a11d-d84416b814f6"
}Bylaw4510daf9-5abc-4d7d-a11d-d84416b814f6.bylaw.ps1 · 24 lines
# Converted from StorageAccountBlobs_EnableAzureBackup_Audit.json by ConvertTo-Bylaw.
Policy '4510daf9-5abc-4d7d-a11d-d84416b814f6' {
Properties @{
DisplayName = '[Preview]: Azure Backup should be enabled for Blobs in Storage Accounts'
Description = 'Ensure protection of your Storage Accounts by enabling Azure Backup. Azure Backup is a secure and cost effective data protection solution for Azure.'
Version = '1.0.0-preview'
Category = 'Backup'
Preview = $true
PolicyVersion = '1.0.0-preview'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Storage/storageAccounts'
AuditIfNotExists 'Microsoft.DataProtection/backupInstances' -Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Backup/StorageAccountBlobs_EnableAzureBackup_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw