Bicep Build should not include unused linked templates
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
We have a very large collection of bicep modules. In some cases, we have hard coded variables set to false, which are then based as input parameters to modules. Within that module, we will have a resource creation conditional on the variable. (Other deployment scripts may use this, as we share these resources across many solutions.
Currently, when we run "bicep build", sections are included even when they are unreachable because of hard coded variables.
Describe the solution you'd like
During the build process, if variables can be determined at build time, and are found to be false, the linked arm templates that would go unused should be dropped from the arm.template.
This way, only resources that are going to be deployed are included, simplifying the final template.
Contributor guide
Research direction
No files, tests, or entry points are identified in the issue. Start by locating the bicep build implementation and the handling of compile-time conditions, then define coverage for linked templates proven unreachable from hard-coded false values. Done means the generated ARM template omits those unused linked templates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- build-system, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100