【发布时间】:2018-10-15 21:46:14
【问题描述】:
尝试构建一个 ARM 模板来部署多个 VM。但是,模板验证失败并显示以下错误消息
部署模板验证失败:'资源 'Microsoft.Network/networkInterfaces/sqlnodeNic' 未在 模板。请参阅https://aka.ms/arm-template 了解使用详情。'。
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2015-06-15",
"location": "[resourceGroup().location]",
"name": "[concat(variables('sqlNodeNicName'),copyIndex())]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks',variables('vnetname'))]",
"[concat('Microsoft.Network/publicIPAddresses/', concat(variables('PiPName'),copyIndex()))]"
],
"tags": {
"displayName": "[concat(variables('sqlNodeNicName'),copyIndex())]"
},
"properties": {
"ipConfigurations": [
{
"name": "[concat('ipconfig1',copyIndex())]",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[variables('sqlNodeSubnetRef')]"
},
"publicIPAddress": {
"id": "[concat('Microsoft.Network/publicIPAddresses/', concat(variables('PiPName'),copyIndex()))]"
}
}
}
]
},
"copy": {
"name": "nicCopy",
"count": "[variables('VmCount')]"
}
},
【问题讨论】:
标签: azure-resource-manager azure-template