Replies: 1 comment 1 reply
-
Hey @jachin84, there is a way to do this in Azure Bicep too. Probably via multiple ways, but I like to use environment variables to set the DTAP environment. In the Bicepparam file you can use the (plug) I have written a blog on how I use Azure Pipelines to supply environment variables to the Bicepparam file: https://johnlokerse.dev/2023/10/02/work-with-environment-variables-in-azure-bicep/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have spotted a pattern emerging in one of our Bicep repos where the parameter files for different environments are very similar. Consider the comparison below.
As you can see these files are mostly the same. There is an argument you could move some of this configuration into the main Bicep file but I'm not keen on this approach. What I'd like is a way to do variable substitution in the params file. Something like how Octopus Deploy does variable substitution, https://octopus.com/docs/projects/variables/variable-substitutions. This is done using https://github.com/OctopusDeploy/Octostache.
This would allow something like this:
The variable could be supplied via another bicepparam file or even pulled in from environment variables. I suspect there may be a solution to this already but I'm yet to find it in my searching/experimentation. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions