【发布时间】:2023-03-28 02:48:01
【问题描述】:
我有一个 ARM 模板,它尝试根据一组防火墙参数为 Azure Data Lake Store 设置防火墙规则。 IP 规则的参数列表是不同的,没有重复,但是当我尝试部署时模板报告重复。
知道哪里出了问题或如何进一步排除故障吗?
Azure Data Lake Store 的属性(在 ARM 模板中)
"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]"
}
}
}
]
错误信息:
[错误] New-AzureRmResourceGroupDeployment:18:57:28 - 资源 Microsoft.DataLakeStore/accounts 'myadlsname' 失败并出现 [错误] 消息'{[错误]“错误”:{[错误]“代码”: "DuplicedNestedResource", [ERROR] "message": "有防火墙 Body 中具有相同名称的规则。” [ERROR] } [ERROR] }'
参数:
"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"
}
]
}
【问题讨论】:
标签: azure azure-resource-manager arm-template