Jan 14 2020 04:14 AM - last edited on Nov 29 2021 09:22 AM by Allen
Hi all!
I'm trying to configure a Policy, that I anticipated shouldn't be to tricky, but for some reason I have a hard time getting it to work...
Edit: Started working out of nowhere a few minutes ago...
Configuration is as follow
"parameters": {
"allowedIPAddress": {
"type": "Array",
"metadata": {
"displayName": "Allowed IP Addresses",
"description": "The list of allowed IP adresses for this resource."
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "Microsoft.Storage/storageAccounts/networkAcls.ipRules",
"exists": "true"
},
{
"field": "Microsoft.Storage/storageAccounts/networkAcls.ipRules[*].value",
"notIn": "[parameters('allowedIPAddress')]"
}
]
},
"then": {
"effect": "deny"
}
}
Jan 14 2020 01:06 PM
Hi @Anders Eide,
Is there not another {} Missing?
One at the beginning befor the parameters and one at the end?
Kind regards, Peter
Jan 15 2020 01:01 AM
I've only added the perameters and policyRule object to the code snippet to avoid to much bloat in the post :)
I've updated the original post to fix the indention issue so it's easier to read