I have an ARM template which attempts to set up firewall rules for an Azure Data Lake Store based on an array of firewall parameters. The parameter list for the IP rules is distinct, there is no duplication, however the template reports duplicates when I try deploy.
Any idea where it is going wrong or how to troubleshoot further?
Properties of the Azure Data Lake Store (in the ARM template)
"copy": [
{
"name": "firewallRules",
"count": "[length(parameters('firewallRules'))]",
"input": {
"name": "[parameters('firewallRules')[copyIndex('firewallRules')].name",
"properties": {
"startIpAddress": "[parameters('firewallRules')[copyIndex('firewallRules')].startIp]",
"endIpAddress": "[parameters('firewallRules')[copyIndex('firewallRules')].endIp]"
}
}
}
]
Error Message:
[ERROR] New-AzureRmResourceGroupDeployment : 18:57:28 - Resource Microsoft.DataLakeStore/accounts 'myadlsname' failed with [ERROR] message '{ [ERROR] "error": { [ERROR] "code": "DuplicatedNestedResource", [ERROR] "message": "There're firewall rules with the same name in Body." [ERROR] } [ERROR] }'
Parameters:
"FirewallRules": {
"value": [
{
"name": "Allow_1",
"startIp": "1.1.1.1",
"endIp": "1.1.1.1"
},
{
"name": "Allow_2",
"startIp": "2.2.2.2",
"endIp": "2.2.2.2"
},
{
"name": "Allow_3",
"startIp": "3.3.3.3",
"endIp": "3.3.3.3"
}
]
}