ADR-006: In-repo Bicep modules, aligned to AVM, not fetched from the public registry¶
- Status: Accepted
- Date: 2026-11-25
- Deciders: the lab
Context¶
Azure Verified Modules (br/public:avm/...) are the modules Microsoft wants new landing zones to be built from. The Azure Landing Zones Bicep accelerator composes them. They are versioned, tested, and larger than a learning file: a virtual network module has a wide parameter surface, diagnostic settings, locks, and role assignments.
This repo has to build in GitHub Actions with no Azure login and no restored external modules. It also has to stay readable. A landing zone you cannot open and read is a poor teaching artifact.
Decision¶
Write the lab modules in infra/modules/ and pin API versions that Bicep 0.49.2 accepts. Follow AVM habits where they are visible in a small module: parameters for names and regions, tags passed in, diagnostics optional, expensive features behind a flag, no secrets in parameters.
Do not take a br/public dependency in this repository.
When a client platform is built, start from the Azure Landing Zones deployment options Bicep accelerator and AVM resource modules. Use this repo to explain the design and the deltas, not as the module source to copy into production.
Consequences¶
- CI is hermetic.
scripts/build-and-lint.shneeds the Bicep CLI only. - These modules will drift from AVM. That drift is acceptable while the files stay small and the ADRs stay honest.
- A pull request that introduces
br/publicneeds to update this ADR and the CI install steps, because the build will restore modules from the registry.
Alternatives considered¶
- Call AVM modules directly. Rejected for the lab because the build would depend on the registry and the resource shape would be hidden behind a parameter object.
- Vendor a snapshot of AVM into the repo. Rejected. Vendored modules are large, and updating them is a project of its own.