RedisEnterprise resource deployment fails subsequently
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
- 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'
}
}
- 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.
It looks like you did not include the "localPath" property to your template. Can you try adding that property and deploy again?
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": {}
}
]
}
]
}
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'.
I'm having same issue as well. It is true that there's no "localPath" configuration based on the documentation.
Any updates? Blocks me from moving to this resource from Azure Cache for Redis
@stephaniezyen
@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.
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)
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.
I found that when not using the outputs of the redis resources is doesnt produce the issue
I found that when not using the outputs of the redis resources is doesnt produce the issue
Unfortunately, I'm unable to verify that. On my side the deployment fails with the same error, even when the outputs of both redisEnterprise & redisEnterprise/databases are not used.
@stephaniezyen @anthony-c-martin An update: the issue occurs when trying to pull redisEnterprise primary key using either a) resource output
redisEnterprisePrimaryKey: redisEnterprise.listKeys().primaryKey
b) listKeys method
listKeys(
resourceId('Microsoft.Cache/redisEnterprise', 'redis-${prefix}-${environment}-${locationShort}'),
'2025-08-01-preview'
).primaryKey
Without it, the resources deploying successfully.
@Rasmus715 do you add decorator @secure() for the output?
@Rasmus715 do you add decorator @secure() for the output?
For the input parameter of module, where the primary key is used, there is a secure() decorator.
@secure()
param redisEnterprisePrimaryKey string
@Rasmus715 for the output. What you output is a secret.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/outputs?tabs=azure-powershell#secure-outputs
No module output are used within redisEnterpise resource.
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'
}
}
resource redisEnterpriseDatabase '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'
}
}
module keyVaultModule 'keyvault.bicep' = {
name: 'keyvault_${deployment().name}'
params: {
keyVaultName: keyvaultName
---
redisEnterprisePrimaryKey: listKeys(
resourceId('Microsoft.Cache/redisEnterprise', 'redis-${prefix}-${environment}-${locationShort}'),
'2025-08-01-preview'
).primaryKey
OR
redisEnterprisePrimaryKey: redisEnterprise.listKeys().primaryKey
}
}
ok than it is irrelevant. You could try tp pass the redis details - name, resource group and subscription (in case they are in different one) to the module keyvault.bicep and within that module call redis instance as existence resource and call listKeys() to put the primary key in Key vault secret - assuming that is what you want to do. Passing that as parameters in the module is not necessary. Only when you want to get secret value from Key Vault is required to have it as input for parameter. Anything that uses list*() can be called directly without having to be passed as parameter.
@Rasmus715 I'm one of the Redis Enterprise service owners. I checked your bicep, everything looks good except the output has an error:
redisEnterprisePrimaryKey: redisEnterprise.listKeys().primaryKey
The listKeys API is under redisEnterprise/databases instead: https://learn.microsoft.com/en-us/rest/api/redis/redisenterprisecache/databases/list-keys?view=rest-redis-redisenterprisecache-2025-07-01&tabs=HTTP
So the correct way to invoke it in your bicep is:
redisEnterprisePrimaryKey: redisEnterpriseDatabase.listKeys().primaryKey
Can you confirm if this fixes the issue for you?
Acknowledge that the error message is confusing and misleading. It has nothing to do with "localPath" - just the request hit a unsupported endpoint and triggered an unexpected validation failure message mapping. We already filed the internal bug to improve error message.
I have missed the list keys as well but I have blogged about this several months ago: https://cloudadministrator.net/2025/10/21/list-keys-for-azure-managed-redis-with-bicep/