Got it to work and I am posting for the next person that needs it.
"parameters": {
"listOfWestLocations": {
"type": "Array",
"metadata": {
"displayName": "listOfWestLocations",
"description": "Location that will have the West DNS Settings"
},
"defaultValue": [
"westus",
"westus1",
"westus2",
"westcentralus"
]
},
"listOfEastLocations": {
"type": "Array",
"metadata": {
"displayName": "listOfEastLocations",
"description": "Location that will have the West DNS Settings"
},
"defaultValue": [
"eastus",
"eastus1",
"eastus3",
"centralus",
"northcentralus",
"southcentralus"
]
}
},
"policyRule": {
"if": {
"allof": [
{
"field": "type",
"equals": "Microsoft.Network/virtualNetworks"
},
{
"allof": [
{
"anyOf": [
{
"value": "8.8.8.8",
"notIn": "[take(field('Microsoft.Network/virtualNetworks/dhcpOptions.dnsServers[*]'),1)]"
},
{
"value": "8.8.4.4",
"notIn": "[take(field('Microsoft.Network/virtualNetworks/dhcpOptions.dnsServers[*]'),2)]"
},
{
"value": "76.76.2.0",
"notIn": "[take(field('Microsoft.Network/virtualNetworks/dhcpOptions.dnsServers[*]'),3)]"
},
{
"field": "location",
"notIn": "[parameters('listOfWestLocations')]"
}
]
},
{
"anyOf": [
{
"value": "76.76.2.0",
"notIn": "[take(field('Microsoft.Network/virtualNetworks/dhcpOptions.dnsServers[*]'),1)]"
},
{
"value": "8.8.4.4",
"notIn": "[take(field('Microsoft.Network/virtualNetworks/dhcpOptions.dnsServers[*]'),2)]"
},
{
"value": "8.8.8.8",
"notIn": "[take(field('Microsoft.Network/virtualNetworks/dhcpOptions.dnsServers[*]'),3)]"
},
{
"field": "location",
"notIn": "[parameters('listOfEastLocations')]"
}
]
}
]
}
]
},
"then": {
"effect": "audit"
}
}
},