Allow single dependsOn as well as array
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
While Bicep reduces the need to include an explicit `dependsOn`, I have found I need to do this occasionally. However, I typically only need to depend on one other resource.
I'd really like it if Bicep allowed me to specify a single dependency, and not just an array. For example, both of these would be valid:
```bicep
resource x 'y.z@abc' = {
name: 'x'
dependsOn: y
}
```
```bicep
resource x 'y.z@abc' = {
name: 'x'
dependsOn: [
y
]
}
```
This would help with template readability, reduce visual noise, and reduce the overall line count of my Bicep files.
Contributor guide
Research direction
The issue names no source files, tests, or entry points. Start by locating the existing handling of the dependsOn property and its array-only validation, then add coverage for both the single-resource and array forms; done means both examples parse and produce the expected dependency behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100