Add `subscription().tags` property
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Is your feature request related to a problem? Please describe.**
Today I can get at the tags in a resourceGroup by calling `resourceGroup().tags` within a `func`, but not for `subscription().tags`, which would be really useful for things like:
```bicep
@export()
@description('Gets cloud deatails for a tenant id')
func CurrentTenantDetails() object => ( IsTestEnv() ? Test : Tenants[tenant().tenantId] ) ?? fail('Unable to find tenant details: unknown tenant')
func IsTestEnv() bool => contains(['ppe', 'test', 'int'], toLower(resourceGroup().?tags.?environment))
```
**Describe the solution you'd like**
Please add `tags` property to the object returned by `subscription()`
Contributor guide
Research direction
Start by tracing the Bicep implementation of subscription() and comparing it with resourceGroup().tags, using the example in the issue as the behavioral reference. Done means subscription().tags is available in funcs and returns the subscription tags without changing existing resourceGroup().tags behavior; add coverage wherever the repository tests these functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100