【问题标题】:ARM template deployment unhelpful errors, including "The domain name '...' request is invalid. Resource tags are not supported."ARM模板部署无用错误,包括“域名'...'请求无效。不支持资源标签。”
【发布时间】:2019-12-16 18:33:03
【问题描述】:

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

错误 1:

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"
  }
}

【问题讨论】:

    标签: azure azure-resource-manager arm-template azure-cli infrastructure-as-code


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-28
      • 2020-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多