Hi DanaR
I have reached out to you in a private message.
Just to clarify, Since the specific IP address will fall within the provided CIDR range (e.g., /16, /32, /64), you should define the address range in the policy instead of the individual IP address to ensure the policy functions correctly.
Example: 1.2.3.4 will fall under 1.2.3.0/16
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/networkSecurityGroups/securityRules"
},
{
"field": "Microsoft.Network/networkSecurityGroups/securityRules/direction",
"equals": "Inbound"
},
{
"field": "Microsoft.Network/networkSecurityGroups/securityRules/sourceAddressPrefix",
"in": [
"1.2.3.0/32",
"5.6.7.0/32",
"10.0.0.0/32"
]
}
]
},
"then": {
"effect": "deny"
}
},
"parameters": {}
}
Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.
Thankyou