Write Azure policy to deny adding a second diagnostic setting to any resource if the first diagnostic setting already exists
jarvis-8094
0
Reputation points
I tried the below code, but it doesn't seem to have any resource details and it doesn't work
{ "mode": "All", "policyRule": { "if": { "field": "type", "equals": "Microsoft.Insights/diagnosticSettings" }, "then": { "effect": "deny" } }, "parameters": {} }