在Azure中部署WebApp ARM模板时,我收到以下错误:
'模板功能' copyIndex'预计不会在这个位置。该功能只能在指定了副本的资源中使用。'
"resources":[
{
"type": "Microsoft.Web/sites/config",
"name": "[concat(variables('webSiteName'),'/','web')]",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('webSiteName'))]"
],
"properties": {
"alwaysOn": "true",
"copy": [
{
"name": "virtualApplications",
"count": "[length(parameters('virtualdirectories'))]",
"input": {
"virtualPath": "[parameters('virtualdirectories')[copyIndex('virtualApplications')].virtualpath]",
"physicalPath": "[parameters('virtualdirectories')[copyIndex('virtualApplications')].physicalpath]"
}
}
]
}
我的参数文件包含虚拟目录..:
"virtualdirectories": {
"value": [
{
"virtualpath": "vd1",
"physicalpath": "site\\pd1"
},
{
"virtualpath": "vd2",
"physicalpath": "site\\pd2"
}
]
}
任何想法都错了吗?