Strongly-typed ResourceID
- 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.**
Given a full resource ID to a child resource have the ability to create a resource ID of the parent.
Excerpted from #3173: some RPs provide a full resource ID to some other (child) resources. For example: Microsoft.Network/loadBalancers provides the full ip configuration resource ID in its properties 'backendAddressPools[0].properties.backendIPConfigurations[0].id' as:
```json
{
"id": "/subscriptions//resourceGroups//providers/Microsoft.Compute/virtualMachineScaleSets//virtualMachines/0/networkInterfaces//ipConfigurations/"
},
```
**Describe the solution you'd like**
* Idea 1: have a type `resourceID` that can be initiated using a string (or the output of `*resourceId()` function). The type could allow `.parent` to obtain the parent resource ID.
* Idea 2: similar to above but using a new `parentResourceId()` function
Contributor guide
Research direction
The issue names no implementation files or tests; start with issue #3173 and the full child resource ID example here. Compare the proposed strongly typed resourceID and parentResourceId approaches, then define and validate the selected behavior for deriving a parent resource ID from a full child ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100