Azure Policies - Redis Cache preview feature private endpoints

amc3280 1 Reputation point
2021-02-12T20:19:07.34+00:00

Writing a policy for Azure Redis Cache, for private endpoints, seems the aliases are not available for querying even though they are listed when running an get-azpolicyalias command. Is this because the private endpoints feature is still under review? Neither approach below is working.

{
      "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')]"
      }
  }

and

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

Thanks for any help you may provide.

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
224 questions
Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
815 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KalyanChanumolu-MSFT 8,316 Reputation points
    2021-02-15T09:30:16.957+00:00

    @amc3280 Welcome to Microsoft Q&A and thank you for your interest in Azure services.
    The aliases for PrivateEndPointConnections are there but not yet available for use with Azure Policy as the feature is still in preview.

    68098-image.png

    Please watch this page for updates.

    ----------

    If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.

    0 comments No comments