Inform when a resource property constant equals the property default value
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
It would be amazing if the Bicep linter could suggest cleaning up resource property definitions, where the resolved value is a constant, and where that constant is the same as the default value of the property. That way Bicep could guide authors in creating minimum definitions with often improved readability. At the moment it is based mostly on the author's knowledge as well as performing trial deployments and reviewing what the resource spits out.
I understand that this is problematic since ARM schemas do not indicate such default values (not sure why), sometimes default values are not constants but dependent on other properties, and sometimes default values even [change for the same resource type version](https://techcommunity.microsoft.com/t5/azure-storage-blog/azure-storage-updating-some-default-security-settings-on-new/ba-p/3819554). However there are many typical properties that have a static default, which are defined in the freeform property documentation.
Just wondering if there is any work happening on this front?
Contributor guide
Research direction
The issue names the Bicep linter, ARM schemas, and freeform property documentation, but no repository files or tests. Start by locating the linter rule and the resource-property metadata source, then confirm how static defaults are represented. Done means identifying constant values equal to documented defaults without treating dynamic or version-dependent defaults as static.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100