Replace ScopeType with a more flexible metadata property
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
Each resource type read by Bicep has a `ScopeType` property that identifies the target scopes in which that type may be used. The [existing scopes](https://github.com/Azure/bicep/blob/c7ce9784bf5a59ea1f2236cb6ab5e1878626769d/src/Bicep.Core/TypeSystem/ResourceScopeType.cs) are Azure specific and will not necessarily translate cleanly into the scopes used by other providers. At some point before extensibility becomes generally available, the `ScopeType` property should be replaced with a more generic `metadata` property that can contain well-known, widely applicable properties as well as provider-specific metadata that may be necessary to influence Intellisense or the template emitter.
This would be a breaking change, and its rollout would need to be managed appropriately.
Contributor guide
Research direction
Start with src/Bicep.Core/TypeSystem/ResourceScopeType.cs and trace how ScopeType is consumed for resource types, IntelliSense, and template emission. Define the generic metadata shape, provider-specific behavior, and a managed breaking-change rollout before implementation; done means extensibility can use metadata without relying on Azure-specific scopes.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100