Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to cretae a Application Gateway WAF policy resource lock enable policy #1600

Open
Devaraj004 opened this issue Mar 20, 2024 · 0 comments

Comments

@Devaraj004
Copy link

Hi Team,

I am trying to create a custom policy for Azure Application Gateway WAF policy resource lock enable via policy, we need to restrict the user to modify or delete the WAF rules. i am using below policy definition below but getting the error, could you please check and support this one or please suggest the correct policy definition

{
  "mode": "All",
  "policyRule": {
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"
        }
      ]
    },
    "then": {
      "effect": "deny",
      "details": {
        "type": "Microsoft.Authorization/locks",
        "existenceCondition": {
          "allOf": [
            {
              "field": "Microsoft.Authorization/locks/level",
              "equals": "CanNotDelete"
            }
          ]
        }
      }
    }
  }

Error :
The policy definition '171d5886-c7ef-48d4-b556-b06f6b9b76bd' rule is invalid. The policy effect 'details' property could not be parsed using mode 'All'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant