bicep icon indicating copy to clipboard operation
bicep copied to clipboard

RedisEnterprise resource deployment fails subsequently

Open Rasmus715 opened this issue 2 months ago • 5 comments

Bicep version Used within Azure DevOps ubuntu-latest agent. 0.38.33 (6bb5d5f859)

Describe the bug When redisEnterpise & database is specified in bicep file, deployment to the Azure fails. However, manual resource creation via Marketplace works successfully.

To Reproduce

  1. Add following resources to bicep file:
resource redisEnterprise 'Microsoft.Cache/redisEnterprise@2025-08-01-preview' = {
  name: 'redis-${prefix}-${environment}-${locationShort}'
  location: location
  sku: {
    name: 'Balanced_B0'
  }
  properties: {
    highAvailability: 'Enabled'
    publicNetworkAccess: 'Enabled'
  }
  tags: {}
}

resource redisEnterpriseDatabase 'Microsoft.Cache/redisEnterprise/databases@2025-08-01-preview' = {
  name: 'default'
  parent: redisEnterprise
  properties: {
    clientProtocol: 'Encrypted'
    evictionPolicy: 'NoEviction'
    clusteringPolicy: 'OSSCluster'
    deferUpgrade: 'NotDeferred'
    persistence: {
      aofEnabled: false
      rdbEnabled: false
    }
    accessKeysAuthentication: 'Enabled'
  }
}
  1. Deploy infrastructure to Azure

ARM Template:

        {
            "type": "Microsoft.Cache/redisEnterprise",
            "apiVersion": "2025-08-01-preview",
            "name": "[format('redis-{0}-{1}-{2}', parameters('prefix'), parameters('environment'), parameters('locationShort'))]",
            "location": "[parameters('location')]",
            "tags": {},
            "sku": {
                "name": "Balanced_B0"
            },
            "properties": {
                "highAvailability": "Enabled",
                "publicNetworkAccess": "Enabled"
            }
        },
        {
            "type": "Microsoft.Cache/redisEnterprise/databases",
            "apiVersion": "2025-08-01-preview",
            "name": "[format('{0}/{1}', format('redis-{0}-{1}-{2}', parameters('prefix'), parameters('environment'), parameters('locationShort')), 'default')]",
            "dependsOn": [
                "[resourceId('Microsoft.Cache/redisEnterprise', format('redis-{0}-{1}-{2}', parameters('prefix'), parameters('environment'), parameters('locationShort')))]"
            ],
            "properties": {
                "clientProtocol": "Encrypted",
                "evictionPolicy": "NoEviction",
                "clusteringPolicy": "OSSCluster",
                "deferUpgrade": "NotDeferred",
                "persistence": {
                    "aofEnabled": false,
                    "rdbEnabled": false
                },
                "accessKeysAuthentication": "Enabled"
            }
        },

Additional context location: WestEurope Version downgrade of the resource does not mitigate the issue.

Image

Rasmus715 avatar Dec 02 '25 14:12 Rasmus715

It looks like you did not include the "localPath" property to your template. Can you try adding that property and deploy again?

stephaniezyen avatar Dec 03 '25 21:12 stephaniezyen

https://learn.microsoft.com/en-us/azure/templates/microsoft.cache/redisenterprise?pivots=deployment-language-bicep

https://learn.microsoft.com/en-us/azure/templates/microsoft.cache/redisenterprise/databases?pivots=deployment-language-bicep

No localPath property is specified in documentation of these resources.

This is an ARM that comes when creating resource via Azure Wizard (Marketplace). It does not contain localPath field as well.

{
    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "0.0.0.1",
    "parameters": {},
    "resources": [
        {
            "name": "testtesttest",
            "type": "Microsoft.Cache/redisEnterprise",
            "apiVersion": "2025-07-01",
            "properties": {
                "highAvailability": "Enabled",
                "publicNetworkAccess": "Enabled"
            },
            "location": "westeurope",
            "dependsOn": [],
            "sku": {
                "name": "Balanced_B0"
            },
            "tags": {},
            "resources": [
                {
                    "name": "testtesttest/default",
                    "type": "Microsoft.Cache/redisEnterprise/databases",
                    "apiVersion": "2025-05-01-preview",
                    "properties": {
                        "clientProtocol": "Encrypted",
                        "evictionPolicy": "NoEviction",
                        "clusteringPolicy": "OSSCluster",
                        "deferUpgrade": "NotDeferred",
                        "persistence": {
                            "aofEnabled": false,
                            "rdbEnabled": false
                        },
                        "accessKeysAuthentication": "Enabled"
                    },
                    "dependsOn": [
                        "Microsoft.Cache/redisEnterprise/testtesttest"
                    ],
                    "tags": {}
                }
            ]
        }
    ]
}

Rasmus715 avatar Dec 04 '25 08:12 Rasmus715

Adding "localPath" to a set of properties of both redisEnterpise and redisEnterpise/database does nothing. Adding "localPath" to properties of a resource itself fails bicep build.

2025-12-04T08:31:26.4980599Z az bicep build --file /home/vsts/work/1/s/redacted/redacted.bicep
2025-12-04T08:31:26.4981176Z ========================== Starting Command Output ===========================
2025-12-04T08:31:26.4991589Z [command]/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/74e36c73-933b-4253-919b-284a2d96aead.sh
2025-12-04T08:31:32.4166636Z WARNING: /home/vsts/work/1/s/redacted/redacted.bicep(147,5) : Warning BCP037: The property "localPath" is not allowed on objects of type "ClusterCreateProperties". Permissible properties include "encryption", "minimumTlsVersion". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037]
2025-12-04T08:31:32.4167637Z WARNING: /home/vsts/work/1/s/redacted/redacted.bicep(163,5) : Warning BCP037: The property "localPath" is not allowed on objects of type "DatabaseCreateProperties". Permissible properties include "geoReplication", "modules", "port". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037]
2025-12-04T08:31:32.6359464Z ERROR: /home/vsts/work/1/s/redacted/redacted.bicep(145,3) : Error BCP037: The property "localPath" is not allowed on objects of type "Microsoft.Cache/redisEnterprise". Permissible properties include "asserts", "dependsOn", "identity", "zones". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037]
2025-12-04T08:31:32.6360659Z /home/vsts/work/1/s/redacted/redacted.bicep(157,3) : Error BCP037: The property "localPath" is not allowed on objects of type "Microsoft.Cache/redisEnterprise/databases". Permissible properties include "asserts", "dependsOn". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037]
2025-12-04T08:31:32.7936037Z 
2025-12-04T08:31:32.8018493Z ##[error]Bash exited with code '1'.

Rasmus715 avatar Dec 04 '25 08:12 Rasmus715

I'm having same issue as well. It is true that there's no "localPath" configuration based on the documentation.

Image

barefootwanderer21 avatar Dec 08 '25 02:12 barefootwanderer21

Any updates? Blocks me from moving to this resource from Azure Cache for Redis

Rasmus715 avatar Dec 12 '25 07:12 Rasmus715

@stephaniezyen

Rasmus715 avatar Dec 17 '25 07:12 Rasmus715

@Rasmus715 if you were already able to deploy these resoures manually, have you tried using the Insert Resource Command or Portal export? Sometimes what happens is the resource provider hasn't correctly documented the available properties - this can help to discover what is missing.

@stephaniezyen I think it would be worth engaging the owners of this resource type internally, to see if they can share guidance on this thread.

anthony-c-martin avatar Dec 17 '25 13:12 anthony-c-martin

The Portal Export returns the next resources

resource redisEnterprise_resource 'Microsoft.Cache/redisEnterprise@2025-05-01-preview' = {
  name: redisEnterprise
  location: 'West Europe'
  sku: {
    name: 'Balanced_B0'
  }
  kind: 'v2'
  identity: {
    type: 'None'
  }
  properties: {
    minimumTlsVersion: '1.2'
    highAvailability: 'Enabled'
  }
}

resource redisEnterprise_default 'Microsoft.Cache/redisEnterprise/databases@2025-05-01-preview' = {
  parent: redisEnterprise
  name: 'default'
  properties: {
    clientProtocol: 'Encrypted'
    port: 10000
    clusteringPolicy: 'OSSCluster'
    evictionPolicy: 'NoEviction'
    persistence: {
      aofEnabled: false
      rdbEnabled: false
    }
    deferUpgrade: 'NotDeferred'
    accessKeysAuthentication: 'Enabled'
  }
}

Replacing my existing Redis resource with this still produces an error in Azure.

"Insert Resource" command gives the next resource specification:

@description('Generated from redacted')
resource redisEnterprise 'Microsoft.Cache/redisEnterprise@2025-08-01-preview' = {
  location: 'West Europe'
  name: 'redis-${prefix}-${environment}-${locationShort}'
  tags: {}
  sku: {
    name: 'Balanced_B0'
  }
  properties: {
    minimumTlsVersion: '1.2'
    highAvailability: 'Enabled'
    publicNetworkAccess: 'Enabled'
  }
  identity: {
    type: 'None'
  }
}

With which bicep deployment still fails with the same error.

{ "errors": { "localPath": [ "The localPath field is required." ] }, "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1", "title": "One or more validation errors occurred.", "status": 400, "traceId": "00-7fddf0a107cba81deb0875219f90647a-23ded10c6db8f37d-01" } (Code: BadRequest)
Image

Rasmus715 avatar Dec 18 '25 08:12 Rasmus715

Thanks for testing this out - @stephaniezyen has reached out to the owners of this resource type, and we'll share an update here once we have more info.

anthony-c-martin avatar Dec 18 '25 20:12 anthony-c-martin