-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Built-in Policy Release f2126eef (#1191)
Co-authored-by: Azure Policy Bot <azgovpolicy@microsoft.com>
- Loading branch information
Showing
16 changed files
with
358 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
built-in-policies/policyDefinitions/Backup/RecoveryServices_Immutability_Audit.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"properties": { | ||
"displayName": "[Preview]: Immutability must be enabled for Recovery Services vaults", | ||
"description": "This policy audits if the immutable vaults property is enabled for Recovery Services vaults in the scope. This helps protect your backup data from being deleted before its intended expiry. Learn more at https://aka.ms/AB-ImmutableVaults.", | ||
"policyType": "BuiltIn", | ||
"mode": "Indexed", | ||
"metadata": { | ||
"version": "1.0.0-preview", | ||
"preview": true, | ||
"category": "Backup" | ||
}, | ||
"version": "1.0.0-preview", | ||
"parameters": { | ||
"effect": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Effect", | ||
"description": "Enable or disable the execution of the policy." | ||
}, | ||
"allowedValues": [ | ||
"Audit", | ||
"Disabled" | ||
], | ||
"defaultValue": "Audit" | ||
}, | ||
"checkLockedImmutabilityOnly": { | ||
"type": "Boolean", | ||
"metadata": { | ||
"displayName": "CheckLockedImmutabilityOnly", | ||
"description": "This parameter checks if Immutability is locked for Recovery Services Vaults in scope. Selecting 'true' will mark only vaults with Immutability 'Locked' as compliant. Selecting 'false' will mark vaults that have Immutability either 'Enabled' or 'Locked' as compliant." | ||
}, | ||
"allowedValues": [ | ||
true, | ||
false | ||
], | ||
"defaultValue": true | ||
} | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"allOf": [ | ||
{ | ||
"field": "type", | ||
"equals": "Microsoft.RecoveryServices/vaults" | ||
}, | ||
{ | ||
"anyOf": [ | ||
{ | ||
"field": "Microsoft.RecoveryServices/vaults/securitySettings.immutabilitySettings.state", | ||
"notIn": [ | ||
"Locked", | ||
"UnLocked" | ||
] | ||
}, | ||
{ | ||
"allOf": [ | ||
{ | ||
"value": "[parameters('checkLockedImmutabilityOnly')]", | ||
"equals": true | ||
}, | ||
{ | ||
"field": "Microsoft.RecoveryServices/vaults/securitySettings.immutabilitySettings.state", | ||
"notEquals": "Locked" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"then": { | ||
"effect": "[parameters('effect')]" | ||
} | ||
} | ||
}, | ||
"id": "/providers/Microsoft.Authorization/policyDefinitions/d6f6f560-14b7-49a4-9fc8-d2c3a9807868", | ||
"name": "d6f6f560-14b7-49a4-9fc8-d2c3a9807868" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.