Advanced Threat Protection on Storage Accounts Azure Government
Scenario
Enable Advanced Threat Protection on Storage Accounts in Azure Government using policy
Alias
| Microsoft.Security/advancedThreatProtectionSettings/isEnabled |
|---|
This alias is already available in Azure Cloud but needs to be extended to sovereign clouds.
Example policy definition
{ "mode": "Indexed", "policyRule": { "if": { "field": "type", "equals": "Microsoft.Storage/storageAccounts" }, "then": { "effect": "DeployIfNotExists", "details": { "type": "Microsoft.Security/advancedThreatProtectionSettings", "name": "current", "existenceCondition": { "field": "Microsoft.Security/advancedThreatProtectionSettings/isEnabled", "equals": "true" }, "roleDefinitionIds": [ "/providers/Microsoft.Authorization/roleDefinitions/fb1c8493-542b-48eb-b624-b4c8fea62acd" ], "deployment": { "properties": { "mode": "incremental", "template": { "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "storageAccountName": { "type": "string" } }, "resources": [ { "apiVersion": "2017-08-01-preview", "type": "Microsoft.Storage/storageAccounts/providers/advancedThreatProtectionSettings", "name": "[concat(parameters('storageAccountName'), '/Microsoft.Security/current')]", "properties": { "isEnabled": true } } ] }, "parameters": { "storageAccountName": { "value": "[field('name')]" } } } } } } }, "parameters": {} }
The Microsoft.Security provider in Gov cloud is not running the version that supports the ATP setting. I won't be able to add aliases until it's upgraded.
Closing this issue per changes to the support model for this repo. See the Getting Support section in the readme for details and Azure Policy support information.