Gallery › CDN › Azure built-in policies
Azure Front Door profiles should use Premium tier that supports managed WAF rules and private link
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
Azure Front Door Premium supports Azure managed WAF rules and private link to supported Azure origins.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONAFD_Premium_Sku_Audit.json · 50 lines
{
"properties": {
"displayName": "Azure Front Door profiles should use Premium tier that supports managed WAF rules and private link",
"description": "Azure Front Door Premium supports Azure managed WAF rules and private link to supported Azure origins.",
"metadata": {
"version": "1.0.0",
"category": "CDN"
},
"version": "1.0.0",
"policyType": "BuiltIn",
"mode": "Indexed",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Cdn/Profiles"
},
{
"field": "Microsoft.Cdn/Profiles/sku.name",
"equals": "Standard_AzureFrontDoor"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/dfc212af-17ea-423a-9dcb-91e2cb2caa6b",
"name": "dfc212af-17ea-423a-9dcb-91e2cb2caa6b"
}Bylawdfc212af-17ea-423a-9dcb-91e2cb2caa6b.bylaw.ps1 · 28 lines
# Converted from AFD_Premium_Sku_Audit.json by ConvertTo-Bylaw.
Policy 'dfc212af-17ea-423a-9dcb-91e2cb2caa6b' {
Properties @{
DisplayName = 'Azure Front Door profiles should use Premium tier that supports managed WAF rules and private link'
Description = 'Azure Front Door Premium supports Azure managed WAF rules and private link to supported Azure origins.'
Version = '1.0.0'
Category = 'CDN'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Cdn/Profiles' {
Require 'sku.name is not Standard_AzureFrontDoor' {
Field sku.name | Must -Not -Be 'Standard_AzureFrontDoor' -IfPresent
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/CDN/AFD_Premium_Sku_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw