小编Gre*_*ous的帖子

ARM模板连接对象

我正在根据本文尝试在ARM模板中设置一些标签:https : //docs.microsoft.com/zh-cn/azure/azure-resource-manager/resource-manager-templates-resources#apply-一个对象到标签元素

我希望能够在TagValues参数中设置几个通用标记,然后为其他特定资源附加其他标记。这有可能吗?我尝试使用[concat()],但它对处理对象不满意,并且验证失败。

这是我要执行的操作的一个示例:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "tagValues": {
      "type": "object",
      "defaultValue": {
        "Dept": "Finance",
        "Environment": "Production"
      }
    }
  },
  "resources": [
    {
      "apiVersion": "2016-01-01",
      "type": "Microsoft.Storage/storageAccounts",
      "name": "[concat('storage', uniqueString(resourceGroup().id))]",
      "location": "[resourceGroup().location]",
      "tags": "[parameters('tagValues')]",     // want to concatenate another tag here, so that the following is returned: "Dept": "Finance", "Environment": "Production", "myExtraTag": "myTagValue"
      "sku": {
        "name": "Standard_LRS"
      },
      "kind": "Storage",
      "properties": {}
    }
{
          "apiVersion": "2016-01-01",
          "type": "Microsoft.Storage/storageAccounts",
          "name": "mySecondResource",
          "location": "[resourceGroup().location]",
          "tags": "[parameters('tagValues')]", …
Run Code Online (Sandbox Code Playgroud)

azure azure-rm-template

5
推荐指数
1
解决办法
1562
查看次数

使用托管标识从 Azure 逻辑应用向 Azure 函数进行身份验证

我正在尝试为逻辑应用程序和 Azure 函数配置安全性。Azure 函数有一个 HTTP 触发器。到目前为止,我已经完成了以下工作:

  1. 创建了具有一些基本功能的 Azure 函数(在请求日志中写入查询)。
  2. 创建逻辑应用程序(循环触发器,HTTP 触发 Azure 函数)
  3. 测试逻辑App成功调用Azure函数
  4. 向逻辑应用添加了托管标识
  5. 在 Azure Function App 上启用 Azure AD 身份验证/授权,并使用在 Azure AD 中为 Function App 创建应用注册的快速配置。
  6. 在逻辑应用程序中的 HTTP 操作中添加了托管标识作为身份验证方法。

当我运行逻辑应用程序时,它显示 HTTP 操作失败,因为它未经授权。谁能告诉我我错过了什么?我找到了一些关于如何使用类似方法访问 KeyVault(例如)的教程,但对于 Azure 函数却没有。我觉得我需要告诉应用注册逻辑应用的托管标识有权限,但我不知道这是否正确,也不知道如何去做。

azure azure-active-directory azure-logic-apps azure-functions

2
推荐指数
1
解决办法
1656
查看次数