From the course: Azure Infrastructure as Code with GitHub
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Add variables
From the course: Azure Infrastructure as Code with GitHub
Add variables
- [Instructor] To add flexibility to your workflow you can make use of variables. This can be very handy if you have set up a workflow that you want to use on multiple code instances. If we look at our example here, where we deploy to Azure, maybe we have multiple bicep templates in multiple repositories, that we can deploy in the same way. And we can make that easier by using variables for the values that might change often or that are mentioned multiple times in the template. If we look at our example template here, and we scroll down, a good example is the name of the resource group. It is defined twice. It's at line 40, at the inlineScript. But it's also at line 50, the resourceGroupName. So if we add this to a variable then we only have to define it once. And it's a bit easier to change it if we want to deploy something to a different resource group. So let's edit this file. And add the variable. To do that…