Narendra Parachuri
Narendra Parachuri

Reputation: 21

Azure Key Vault parameter reference limit

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?

Upvotes: 2

Views: 362

Answers (3)

bmoore-msft
bmoore-msft

Reputation: 8717

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.

Upvotes: 0

Ian Mercer
Ian Mercer

Reputation: 39277

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.

Upvotes: 0

4c74356b41
4c74356b41

Reputation: 72171

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

Upvotes: 1

Related Questions