Trying to build an ARM template to deploy multiple VM. However, the template validation fails with below error message
Deployment template validation failed: 'The resource 'Microsoft.Network/networkInterfaces/sqlnodeNic' is not defined in the template. Please see https://aka.ms/arm-template for usage details.'.
{
"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')]"
}
},