-1

很抱歉试图得到“以 1 的价格获得 2 个答案”;)但我无法弄清楚部署 ARM 模板时发生的以下错误。

错误一:

8:53:07 - 6:50:52 PM - Resource Microsoft.ClassicCompute/domainNames 'cslmh' failed with message '{
18:53:07 -   "error": {
18:53:07 -     "code": "InvalidDomainNameRequest",
18:53:07 -     "message": "The domain name 'cslmh' request is invalid. Resource tags are not supported."
18:53:07 -   }
18:53:07 - }'

对于我的资源

{
  "apiVersion": "2015-06-01",
  "name": "[variables('CloudServiceName')]",
  "tags": {
    "displayName": "Cloud Service"
  },
  "location": "[parameters('location')]",
  "type": "Microsoft.ClassicCompute/domainNames"
}

错误2:

18:53:07 - 6:51:57 PM - Resource Microsoft.Sql/servers/firewallrules 'mysqlserver/AllowAllWindowsAzureIps' failed with message '{
18:53:07 -   "code": "BadRequest",
18:53:07 -   "message": "Invalid value given for parameter tags. Specify a valid parameter value.",
18:53:07 -   "target": null,
18:53:07 -   "details": [],
18:53:07 -   "innererror": []
18:53:07 - }'

对于我的资源

{
  "name": "[concat(variables('sqlServerName'), '/', 'AllowAllWindowsAzureIps')]",
  "type": "Microsoft.Sql/servers/firewallrules",
  "tags": {
    "displayName": "SQL Server Firewall"
  },
  "location": "[resourceGroup().location]",
  "apiVersion": "2014-04-01-preview",
  "dependsOn": [
    "[resourceId('Microsoft.Sql/servers', variables('sqlServerName'))]"
  ],
  "properties": {
    "startIpAddress": "0.0.0.0",
    "endIpAddress": "0.0.0.0"
  }
}
4

1 回答 1

0

第一个错误 - 经典资源不能有标签,"tags"完全删除属性
第二个错误 - 这是一个“子资源”,我认为你根本不能在那些上有标签,删除"tags"(再次)。

此外,将 Azure SQL 标记为 Azure SQL、将 VM 标记为 VM 等绝对没有意义。

于 2019-08-09T05:41:18.973 回答