【问题标题】:Azure dashboard deployment using ARM template issue使用 ARM 模板问题的 Azure 仪表板部署
【发布时间】:2021-10-23 15:48:16
【问题描述】:

尝试通过 ARM 模板部署 Azure Dashboard,部署后出现问题(见下方截图)。

以下文档用于构建模板:Azure Dashboard

ARM 模板如下:

      "log-analytics-workspace-id": {
      "type": "string",
      "defaultValue": "/subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourcegroups/rg-ProjectX-dev-infra",
      "allowedValues": [
            "/subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourcegroups/rg-ProjectX-dev-infra"
      ],
      "metadata": {
        "description": "The resource ID for an existing Log Analytics workspace."
      }
    }
    "variables": {
      "la-name": "[concat('la', '-', parameters('base-name'), '-', 'workspace')]",
        
        {
        "name": "Scope",
        "value": {
          "resourceIds": "[resourceId('Microsoft.Operationalinsights/workspaces', parameters('log-analytics-workspace-id'), variables('la-name'))]"
          },
       "isOptional": true
        }

resourceIds 值定义如下:

            "name": "Scope",
            "value": {
                "resourceIds": "[parameters('log-analytics-workspace-id')]"
              },
              "isOptional": true
            },

...和参数定义log-analytics-workspace-id

      "log-analytics-workspace-id": {
      "type": "string",
      "defaultValue": "/subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourcegroups/rg-ProjectX-dev-infra/providers/microsoft.operationalinsights/workspaces/la-ProjectX-dev-workspace",
      "allowedValues": [
            "/subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourcegroups/rg-ProjectX-dev-infra/providers/microsoft.operationalinsights/workspaces/la-ProjectX-dev-workspace"
      ],
      "metadata": {
        "description": "The resource ID for an existing Log Analytics workspace."
      }
  }

Azure 仪表板已成功部署,但仪表板尚未运行

Azure dashboard view

【问题讨论】:

    标签: azure dashboard arm-template


    【解决方案1】:

    通过组合数组中的值修复了一个问题:

    {
      "name": "Scope",
      "value": {
         "resourceIds": [
         "[parameters('log-analytics-workspace-id')]"
         ]
      }
    },
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多