Home > Enterprise >  Azure Bicep - creating a Key Vault secret in a pre-existing Azure Key Vault
Azure Bicep - creating a Key Vault secret in a pre-existing Azure Key Vault

Time:02-22

I've seen plenty of Bicep examples where a resource is provisioned and outputs a Key Vault secret to a Key Vault that is also provisioned at the same time of the run.

But what about Bicep code that creates a resource and outputs a Key vault secret into a previously provisioned/pre-existing Key Vault (like a shared Key vault) ?

I'm a Terraform person and would normally use a "data" reference to do this

Thanks in advance

CodePudding user response:

You can define key vault with existing keyword and set it as parent of the keyvault/secrets resources.

However you need to make sure that module with those secrets’ definitions is targeting (the scope Property of the module) the resource group that keyvault is in.

  • Related