Allow for declaring default properties that will be added to all resources declared in a bicep file/project #1639
Labels
enhancement
New feature or request
Milestone
Is your feature request related to a problem? Please describe.
A common issue is needing to assign tags and location to multiple resources (and resources in submodules) that results in a lot of boilerplate code and potential mistakes (especially with tags) if it is forgotten on one or more resources. Nearly every resource has this tag/location definition and leads to a lot of cut/paste non-DRY that the README states is the goal of bicep to reduce.
Describe the solution you'd like
location
bicep keyword (similar tomodule
) that will apply to all resources where location is relevant so it can be omitted. Potentially aschema
keyword that if defined asresourceGroup
the location would automatically be implicit asresourcegroup().location
. If location is defined on a resource it overrides the default location setting.tags
keyword that can be defined at any level and will flow to resources in the same file and downstream modules where tags can be defined and will be merged with any downlevel tags definitions. Potential Issue: How to override tags at a resource level if you want to explicitly override rather than merge. Special tag name perhaps? e.g.__BICEP_DO_NOT_INHERIT: true
EDIT: This is partially covered in a downstream conversation for #1121
The text was updated successfully, but these errors were encountered: