-
Our keyvault's and vm's needs to be created in the same bicep deployment template via module. A secret generated in bicep must be used to set the password for local admin for the VM and put it in a keyvault. We got so far as creating the bellow template, but it fails with "The specified KeyVault '(keyvault id)’ could not be found" :
In ARM we could use:
This does not seem to work anymore in bicep. Any suggestions how we can get the secret from the keyvault? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
How are you generating the password in this case? Are you able to share your repo/sample code? As a general rule, I would suggest that: Service Principals, Certificates, Passwords/Secrets should all be generated outside of a Resource Deployment template. Even User Assigned Identities Role assignments should likely be deployed with an alternate principal than the one doing the Resource deployment. |
Beta Was this translation helpful? Give feedback.
-
The solution used is generating a secret before bicep deployment and passing the secret via parameter in main bicep.
|
Beta Was this translation helpful? Give feedback.
The solution used is generating a secret before bicep deployment and passing the secret via parameter in main bicep.