Gallery › Security Center › Azure built-in policies
Configure Azure Defender for Resource Manager to be enabled
Converted Policy DeployIfNotExists Disabled Mode All Version 2.0.0
Azure Defender for Resource Manager automatically monitors the resource management operations in your organization. Azure Defender detects threats and alerts you about suspicious activity. Learn more about the capabilities of Azure Defender for Resource Manager at https://aka.ms/defender-for-resource-manager . Enabling this Azure Defender plan results in charges. Learn about the pricing details per region on Security Center's pricing page: https://aka.ms/pricing-security-center .
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "Configure Azure Defender for Resource Manager to be enabled",
"policyType": "BuiltIn",
"mode": "All",
"description": "Azure Defender for Resource Manager automatically monitors the resource management operations in your organization. Azure Defender detects threats and alerts you about suspicious activity. Learn more about the capabilities of Azure Defender for Resource Manager at https://aka.ms/defender-for-resource-manager . Enabling this Azure Defender plan results in charges. Learn about the pricing details per region on Security Center's pricing page: https://aka.ms/pricing-security-center .",
"metadata": {
"version": "2.0.0",
"category": "Security Center"
},
"version": "2.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "DeployIfNotExists",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"DeployIfNotExists",
"Disabled"
]
},
"subPlan": {
"type": "String",
"metadata": {
"displayName": "Defender for Resource Manager plans",
"description": "Select a Defender for Resource Manager plan"
},
"allowedValues": [
"PerSubscription"
],
"defaultValue": "PerSubscription"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/pricings",
"name": "Arm",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/fb1c8493-542b-48eb-b624-b4c8fea62acd"
],
"existenceCondition": {
"allOf": [
{
"field": "Microsoft.Security/pricings/pricingTier",
"equals": "Standard"
},
{
"field": "Microsoft.Security/pricings/subPlan",
"equals": "[parameters('subPlan')]"
}
]
},
"deployment": {
"location": "westeurope",
"properties": {
"mode": "incremental",
"parameters": {
"subPlan": {
"value": "[parameters('subPlan')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subPlan": {
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Security/pricings",
"apiVersion": "2023-01-01",
"name": "Arm",
"properties": {
"pricingTier": "Standard",
"subPlan": "[parameters('subPlan')]"
}
}
],
"outputs": {}
}
}
}
}
}
},
"versions": [
"2.0.0",
"1.1.0",
"1.0.2"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/b7021b2b-08fd-4dc0-9de7-3c6ece09faf9",
"name": "b7021b2b-08fd-4dc0-9de7-3c6ece09faf9"
}# Converted from ASC_Azure_Defender_ARM_DINE.json by ConvertTo-Bylaw.
Policy 'b7021b2b-08fd-4dc0-9de7-3c6ece09faf9' {
Properties @{
DisplayName = 'Configure Azure Defender for Resource Manager to be enabled'
Description = 'Azure Defender for Resource Manager automatically monitors the resource management operations in your organization. Azure Defender detects threats and alerts you about suspicious activity. Learn more about the capabilities of Azure Defender for Resource Manager at https://aka.ms/defender-for-resource-manager . Enabling this Azure Defender plan results in charges. Learn about the pricing details per region on Security Center''s pricing page: https://aka.ms/pricing-security-center .'
Version = '2.0.0'
Category = 'Security Center'
PolicyVersion = '2.0.0'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Parameter SubPlan @{
AllowedValues = @('PerSubscription')
Default = 'PerSubscription'
DisplayName = 'Defender for Resource Manager plans'
Description = 'Select a Defender for Resource Manager plan'
}
Resource 'Microsoft.Resources/subscriptions'
DeployIfNotExists 'Microsoft.Security/pricings' -Role 'Security Admin' -Name 'Arm' -ExistenceScope Subscription -Effect (Param Effect) {
Require 'pricingTier is Standard and subPlan is the SubPlan parameter' {
Field pricingTier | Must -Be 'Standard'
Field subPlan | Must -Be (Param SubPlan)
}
Deployment @{
TemplateFile = './templates/b7021b2b-08fd-4dc0-9de7-3c6ece09faf9.json'
Scope = 'Subscription'
Location = 'westeurope'
Parameters = [ordered]@{
subPlan = (Param SubPlan)
}
}
}
}Its deployment templates are written beside it:
templates/b7021b2b-08fd-4dc0-9de7-3c6ece09faf9.json
Source: built-in-policies/policyDefinitions/Security Center/ASC_Azure_Defender_ARM_DINE.json in Azure/azure-policy, under the MIT licence.
Bylaw