Skip to content

Allow single dependsOn as well as array #2452

@johndowns

Description

@johndowns

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:

resource x 'y.z@abc' = {
  name: 'x'
  dependsOn: y
}
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions