azure-policy
azure-policy copied to clipboard
Alias Request: "Microsoft.CDN/profiles/endpoints/originHostName"
I am requesting that an alias be created for the “hostName” property of the “Microsoft.CDN/profiles/endpoints” resource type.
The scenario we are looking to audit for is for any CND Profile resource that use specific origin types (Web Apps, Blob Storage, and Cloud Services) by inspecting the Origin Hostname.
Resource Provider: Microsoft.CDN/profiles Resource Type: profiles/endpoints Property: “properties.origins[*].properties.hostName” Alias Name: "Microsoft.CDN/profiles/endpoints/originHostName"
Example policy definition
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.CDN/profiles"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.CDN/profiles/endpoints",
"existenceCondition": {
"allOf": [
{
"field": "Microsoft.CDN/profiles/endpoints/originHostName",
"notContains": "blob"
}
]
}
}
Full set of aliases for Microsoft.Cdn has been published, including Microsoft.Cdn/profiles/endpoints/origins[*].hostName. Please try it out.