Azure Policy: Disallow dynamic Public IP

{
    "policyRule": {
        "if": {
            "allOf": [{
                    "field": "type",
                    "equals": "Microsoft.Network/publicIPAddresses"
                },
                {
                    "field": "Microsoft.Network/publicIPAddresses/publicIPAllocationMethod",
                    "match": "Dynamic"
                }
            ]
        },
        "then": {
            "effect": "deny"
        }
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.