【问题标题】:How to get the Primary Key of Azure Maps Accounts with Azure Resource Manager Template如何使用 Azure 资源管理器模板获取 Azure Maps 帐户的主键
【发布时间】:2019-04-25 05:11:20
【问题描述】:

对于我的部署,我需要将 Azure Maps 帐户的主键提供给我的前端。部署是使用 azure 资源管理器模板完成的。

密钥应该写在 ARM 模板的输出中。

【问题讨论】:

    标签: azure azure-resource-manager arm-template azure-maps


    【解决方案1】:

    这可以通过以下代码实现:

    "outputs": {
        "mapKey": {
            "type": "string",
            "value": "[listKeys(resourceId('Microsoft.Maps/accounts', variables('mapName')), providers('Microsoft.Maps', 'accounts').apiVersions[0]).primaryKey]",
            "metadata": {
                "description": "primary key for azure map"
            }
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-01
      • 1970-01-01
      相关资源
      最近更新 更多