it is working applying this policy
{
"mode": "Indexed",
"policyRule": {
"if": {
"anyOf": [
{
"not": {
"field": "type",
"equals": "Microsoft.Web/serverfarms"
}
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Storage/storageAccounts"
},
{
"field": "Microsoft.Storage/storageAccounts/networkAcls.defaultAction",
"equals": "Allow"
}
]
},
{
"not": {
"anyOf": [
{
"field": "type",
"equals": "Microsoft.Web/sites"
},
{
"field": "type",
"equals": "Microsoft.Web/serverfarms"
}
]
}
}
],
"allOf": [
{
"not": {
"field": "type",
"equals": "Microsoft.Web/serverfarms"
}
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Storage/storageAccounts"
},
{
"field": "Microsoft.Storage/storageAccounts/networkAcls.defaultAction",
"equals": "Allow"
}
]
},
{
"not": {
"anyOf": [
{
"field": "type",
"equals": "Microsoft.Web/sites"
},
{
"field": "type",
"equals": "Microsoft.Web/serverfarms"
}
]
}
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
}
}