sincecutoff.com
← all changes

azure.yaml infra.layers[].dependsOn declares explicit layer dependencies

Introduced 2026-05-09 · score 0.96

HOW TO USE IT

When a layer depends on a value produced by another layer’s hook and that dependency cannot be inferred from parameter references, add the producing layer’s name to the dependent layer’s `dependsOn` list in `azure.yaml`.

infra: layers: - name: <producer-layer> path: <producer-path> - name: <consumer-layer> path: <consumer-path> dependsOn: - <producer-layer>

WHY THIS HELPS

Model a hook-mediated dependency in a multi-layer azd project that static analysis cannot infer from the infrastructure files.

REQUIREMENTS AND LIMITATIONS

  • Version: 1.25.0
  • infra.layers[].dependsOn: Array of names of layers this layer depends on; declares dependencies the static analyzer cannot infer, including hook-mediated dependencies.
  • Prerequisite: The `dependsOn` field was introduced in azd 1.25.0.
  • This field declares hook-mediated edges that static analysis cannot infer from `.bicep`, `.bicepparam`, or `.parameters.json` contents alone.
  • Explicit edges are validated for unknown layer names, self-references, and cycles.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card