AZ-305 • Practice Test 39
Free AZ-305 practice test — 15 questions with explanations. Set 39. No signup required.
Refer to the exhibit. You are reviewing an Azure Policy definition that your team plans to assign. The policy is intended to deny the deployment of virtual networks and virtual machines if they do not have an NSG attached with a rule named containing 'Allow'. However, the policy is not working as expected. What is the most likely reason?
{
"properties": {
"policyRule": {
"if": {
"anyOf": [
{
"field": "type",
"equals": "Microsoft.Network/virtualNetworks"
},
{
"field": "type",
"equals": "Microsoft.Compute/virtualMachines"
}
]
},
"then": {
"effect": "deny",
"details": {
"existenceCondition": {
"field": "Microsoft.Network/networkSecurityGroups/securityRules[*].name",
"like": "*Allow*"
}
}
}
}
}
}