是否可以动态构造属性名称? 我想做这样的事情:
"resources": [
{
"name": "appsettings",
"type": "config",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('webAppName'))]"
],
"properties": {
"StorageAccounts:WritableAccountName": "[reference('mainStorage').outputs.storageAccountName.value]",
"[concat('StorageAccounts:Accounts:', [reference('mainStorage').outputs.storageAccountName.value])]": "[reference('mainStorage').outputs.storageAccountConnString.value]",
}
}
]
因此,我想创建StorageAccounts:WritableAccountName
和StorageAccounts:Accounts:mystorageaccount
应用设置。
我的方法不起作用:验证模板时出现错误:
无法解析语言表达式'concat(...'
还有另一种方法吗?