Skip to content
Discussion options

You must be logged in to vote

@alessandromoura I believe we have a case of Schrödinger's secret 🙂

The getSecret method was implemented to work with module parameters, which in ARM map to nested deployments. There is no current way to retrieve secrets from the keyvault except as a parameter, based on the current security model. With that, the module parameter is the only place that you can use the getSecret() method in bicep.

It's easiest to see what is going on, If you build the bicep file, so that you can view the ARM template that is created.

bicep build foo.json

resource kv 'Microsoft.KeyVault/vaults@2021-04-01-preview' existing = {
  name: 'AEU2-BRW-AOA-P0-kvVLT01'
  scope: resourceGroup('AEU2-BRW-AOA-RG-P0')
}

m…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@brwilkinson
Comment options

Answer selected by brwilkinson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants