Skip to content

fix(policy): remove duplicate WAF-on-AppGw built in Enforce-Guardrails-Network_20250326 - #2171

Open
Pratyush Verma (pratyushverma63) wants to merge 4 commits into
mainfrom
pratyverma4078_Duplicate_Policy_in_Enforce-Guardrails-Network_20250326
Open

fix(policy): remove duplicate WAF-on-AppGw built in Enforce-Guardrails-Network_20250326#2171
Pratyush Verma (pratyushverma63) wants to merge 4 commits into
mainfrom
pratyverma4078_Duplicate_Policy_in_Enforce-Guardrails-Network_20250326

Conversation

@pratyushverma63

@pratyushverma63 Pratyush Verma (pratyushverma63) commented Jul 14, 2026

Copy link
Copy Markdown

Summary

The Enforce-Guardrails-Network_20250326 initiative referenced the built-in policy
564feb30-bf6a-4854-b4bb-0d2d2d1e6c66 ("Web Application Firewall (WAF) should be enabled for
Application Gateway") twice:

| Deny-Waf-Fw-rules | wafFwRules |
| Deny-AppGw-Without-Waf (duplicate) | appGwWaf |

The Deny-AppGw-Without-Waf entry is redundant — the same built-in is already enforced via
Deny-Waf-Fw-rules. This PR removes the duplicate reference and its now-unused appGwWaf parameter.

Removing a parameter (appGwWaf) from a published initiative can adversely impact any existing
assignment that sets it. Per the breaking-change process,
the fix is delivered as a new dated initiative rather than an in-place edit.

Changes

  • Deprecated Enforce-Guardrails-Network_20250326 — kept as-published, with
    [Deprecated]: displayName, version: 2.0.0-deprecated, deprecated: true, and
    supersededBy: Enforce-Guardrails-Network_20260714.
  • Added Enforce-Guardrails-Network_20260714 — identical content removed the duplicate
    reference and appGwWaf parameter; replacesPolicy: Enforce-Guardrails-Network_20250326;
    version: 2.1.0.
  • initiatives.bicep — loads both the deprecated and the new initiative.
  • initiatives.json — regenerated from Bicep.
  • ENFORCE-GuardrailsNetworkPolicyAssignment.json — default assignment repointed to
    _20260714. (The default assignment does not set appGwWaf, so no assignment parameters change.)
  • eslz-portal.json — AzAdvertizer tooltip URL updated to _20260714.

Files changed (6)

  • src/resources/Microsoft.Authorization/policySetDefinitions/Enforce-Guardrails-Network_20250326.json
  • src/resources/Microsoft.Authorization/policySetDefinitions/Enforce-Guardrails-Network_20260714.json (new)
  • src/templates/initiatives.bicep
  • eslzArm/managementGroupTemplates/policyDefinitions/initiatives.json
  • eslzArm/managementGroupTemplates/policyAssignments/ENFORCE-GuardrailsNetworkPolicyAssignment.json
  • eslzArm/eslz-portal.json

Testing

tested that policy is shown in the portal https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyDetail.ReactView/id/%2Fproviders%2Fmicrosoft.authorization%2Fpolicydefinitions%2F564feb30-bf6a-4854-b4bb-0d2d2d1e6c66/version/2.0.0/scopes~/%5B%22%2Fsubscriptions%2F1a32a88c-076d-45a5-87c7-978346609b5a%22%5D

image image

Related docs PR

Deprecation notice added in Azure/Azure-Landing-Zones: Azure/Azure-Landing-Zones#4211

BREAKING CHANGE: Enforce-Guardrails-Network_20250326 is deprecated and replaced by
Enforce-Guardrails-Network_20260714 (removes the appGwWaf parameter).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Enforce-Guardrails-Network_20250326 custom policy initiative by removing a duplicate reference to the built-in “WAF should be enabled for Application Gateway” policy and deleting the now-unused appGwWaf initiative parameter, keeping the remaining WAF-on-AppGw enforcement via the existing Deny-Waf-Fw-rules reference.

Changes:

  • Removed the appGwWaf initiative parameter (previously only used by the duplicate reference).
  • Removed the duplicate policy reference block Deny-AppGw-Without-Waf for built-in policy 564feb30-bf6a-4854-b4bb-0d2d2d1e6c66.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… duplicate WAF-on-AppGw reference

The built-in policy 564feb30-bf6a-4854-b4bb-0d2d2d1e6c66 (WAF should be enabled for Application Gateway) was referenced twice in Enforce-Guardrails-Network_20250326: as Deny-Waf-Fw-rules (param wafFwRules) and Deny-AppGw-Without-Waf (param appGwWaf).

Following the breaking-change process: the existing initiative is deprecated as-published and superseded by a new dated initiative Enforce-Guardrails-Network_20260714 without the duplicate reference or the redundant appGwWaf parameter. The default network guardrails assignment and portal tooltip now target the new initiative, and initiatives.json was regenerated from Bicep.

BREAKING CHANGE: Enforce-Guardrails-Network_20250326 is deprecated and replaced by Enforce-Guardrails-Network_20260714 (removes the appGwWaf parameter).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…ate_Policy_in_Enforce-Guardrails-Network_20250326

# Conflicts:
#	eslzArm/managementGroupTemplates/policyDefinitions/initiatives.json
…ate_Policy_in_Enforce-Guardrails-Network_20250326

# Conflicts:
#	eslzArm/managementGroupTemplates/policyDefinitions/initiatives.json
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

Successfully merging this pull request may close these issues.

3 participants