尝试构建一个 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')]"
}
},