Skip to content

Commit

Permalink
new policy for appgw pips
Browse files Browse the repository at this point in the history
New Azure Policy for enabling DDoS protection on Azure AppGw Public IPs
  • Loading branch information
gumoden authored Sep 11, 2024
1 parent d48f96f commit 145cf37
Showing 1 changed file with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"properties": {
"displayName": "Public IPs Associated with Azure Application Gateway Should Have DDoS Protection Enabled",
"policyType": "Custom",
"mode": "All",
"description": "Public IPs Associated with Azure Application Gateway Should Have DDoS Protection Enabled.\n\nNote: The Policy checks if DDoS Protection (Virtual Network Inherited or IP Protection is enabled on all Public IP addresses. For Azure Firewall Public IP addresses that do not have DDoS Protection, a non compliance state is returned. ",
"metadata": {
"version": "1.0.0",
"category": "Network"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/publicIPAddresses"
},
{
"field": "Microsoft.Network/publicIPAddresses/ipConfiguration.id",
"contains": "/providers/Microsoft.Network/applicationGateways/"
},
{
"allOf": [
{
"field": "Microsoft.Network/publicIPAddresses/ddosSettings.protectionMode",
"notEquals": "Enabled"
},
{
"field": "Microsoft.Network/publicIPAddresses/ddosSettings.protectionMode",
"notEquals": "VirtualNetworkInherited"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
}
}

0 comments on commit 145cf37

Please sign in to comment.