所有示例都將嵌套模板的模式設置爲「增量」。Azure ARM嵌套模板可以使用Complete模式部署嗎?
當我將它設置爲「完全」,我得到以下錯誤:
error: InvalidNestedDeploymentMode : Specified deployment mode 'Complete' is not supported for nested deployment 'shared'. Please see https://aka.ms/arm-deploy for usage details.
error: Deployment validate failed.
error: Error information has been recorded to /Users/.../.azure/azure.err
verbose: Error: Deployment validate failed.
我試着運行部署創建W /遞增和完整的模式,得到了同樣的錯誤。
不確定這是否甚至可能 - 找不到與錯誤「InvalidNestedDeploymentMode」相關的任何文檔。
部分ARM模板:
{
"name": "[concat('node', copyIndex())]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', 'shared')]"
],
"copy": {
"name": "nodecopy",
"count": "[parameters('vmCount')]"
},
"properties": {
"mode": "Complete",
"templateLink": {
"uri": "...",
"contentVersion": "1.0.0.0"
}
}
在頁面的底部,它說只有根模板可以設置爲完成:https://msdn.microsoft.com/en-us/library/azure/dn790564.aspx 「對於嵌套模板,部署模式完全只允許在根級模板上「 –