resourceId() function in Bicep Parameters
- 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.**
Is there any reason resourceId() function is not available in Bicep parameter files? If I remember correctly someone refereed to resourceId() as basically concat() function for that scenario. Sometimes when deploying features or services a reference to existing resource by ID is required. We do that in code for the Bicep Templates but in some scenarios it might be good to have resourceId() in parameters and generate the ID there. Example case - Metric alerts. We have general template for metric alerts and depending to which resource you create the metric alert (scope) you pass different resource ID and different properties.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Contributor guide
Research direction
Start by tracing how resourceId() is handled in Bicep parameter files and how parameter expressions are evaluated for existing-resource references. Use the metric-alert example and resource IDs as the initial scenarios; done means a clear supported behavior for generating the ID in parameters, with appropriate validation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100