Azure 策略 - Redis 缓存预览功能专用终结点

时间:2021-02-12 18:43:31

标签: azure caching redis terraform policy

为私有端点的 Azure Redis 缓存编写策略,似乎别名不可用于查询,即使它们在运行 get-azpolicyalias 命令时列出。这是因为私有端点功能仍在审核中吗?以下方法均无效。

  {
      "if": {
          "allOf": [
              {
                  "field": "type",
                  "equals": "Microsoft.Cache/redis"
              }
          ]
      },
      "then": {
          "details": {
              "type": "Microsoft.Cache/redis/privateEndpointConnections",
              "existenceCondition": {
                  "field": "Microsoft.Cache/redis/privateEndpointConnections/privateEndpoint.id",
                  "exists": "true"
              }
          },
          "effect": "[parameters('effect')]"
      }
  }

    {
        "if": {
            "allOf": [
                {
                    "field": "type",
                    "equals": "Microsoft.Cache/redis"
                },
                {
                    "field": "Microsoft.Cache/redis/privateEndpointConnections/privateEndpoint.id",
                    "notContains": "/privateEndpointConnections/"
                }
            ]
        },
        "then": {
            "effect": "[parameters('effect')]"
        }
    }

感谢您提供的任何帮助。

0 个答案:

没有答案