'Azure Bicep - creating a Key Vault secret in a pre-existing Azure Key Vault

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



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source