2
votes

When I reference more than 30 keys from my global Key Vault in ARM template parameter file, then I get the following error in my deployments.

The deployment has specified too many KeyVault parameter references. The maximum of KeyVault parameter references is '30'.

Please help me how to override this limit or what is the alternative to reference more than 30 secrets/keys from Key Vault?

3

3 Answers

1
votes

Just create a nested deployment that will reference 30 more secrets and return those as output into the main one, that way you can work around that restriction

0
votes

One alternative is to store multiple values in a single secret as JSON. You can load that single secret from key vault and then use the json() template function to convert it into an object. Pass the secret to a linked template as a string, then use the json function in that linked template.

0
votes

This limit has been increased to 256, which is currently the max number of parameters allowed in a template. See: https://github.com/bmoore-msft/AzureRM-Samples/blob/master/keyvault-max-references/azuredeploy.json for a sample.