Adventures with Bicep: Cosmos Connection Strings

I have been playing around with Azure Bicep for deploying my infrastructure to Azure.

If you are new to Bicep, please take a look at Azure/bicep: Bicep is a declarative language for describing and deploying Azure resources (github.com).

My challenge?

I want to write Cosmos connection strings to Azure Key Vault.

I am using Bicep modules.

I have a Bicep module for creating secrets in Azure Key Vault.

moduleKeyVaultSecret.bicep

I am using syntax supported in ARM templates to get my connection strings, with some help of variables, which I pass in.

I search for this frequently, for some reason, just cannot remember it, so I record it here, more for me, but hopefully it helps another colleague out on their journey with Bicep.

Thanks and God bless!


Discover more from Matt Ruma

Subscribe to get the latest posts to your email.

3 Replies to “Adventures with Bicep: Cosmos Connection Strings”

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *