0

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

1 回答 1

0

我无法告诉您错误是在哪里给出的片段(它没有显示问题发生在哪里),但是查看这个片段您正在生成格式的名称:variable+index,而错误表明某些资源正在寻找nic 调用sqlnodenic,显然与您使用的名称不匹配

于 2018-10-16T04:49:10.630 回答