Update AVM modules in Bicep
Update a Bicep file to the latest compatible Azure Verified Modules (AVM) versions by scanning avm/res/{service}/{resource} references, checking MCR tags, reviewing breaking changes, editing safely, and validating the result.
When to invoke
- "Update Azure Verified Modules in this Bicep file."
- "Check AVM module versions and bump them safely."
- "Use MCR tags to update
avm/res references."
- "Run
bicep lint and bicep build after updating AVM modules."
Prerequisites and context
- A target Bicep file such as
${file} must be available.
bicep must be installed to run bicep lint and bicep build.
- Network access must allow tag discovery from
https://mcr.microsoft.com/v2/bicep/avm/res/{service}/{resource}/tags/list and documentation review at https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}.
AVM discovery rules
| Item |
Rule |
| Module pattern |
Match Azure Verified Modules in Bicep references using avm/res/{service}/{resource}. |
| Version source |
Use the MCR tags API only for version discovery. |
| Tags endpoint |
https://mcr.microsoft.com/v2/bicep/avm/res/{service}/{resource}/tags/list. |
| Docs endpoint |
https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}. |
| Version comparison |
Parse the JSON tags array and sort by semantic versioning. |
| Uniqueness |
Check each unique AVM module once, then apply all occurrences. |
Procedure
- Scan
${file} and extract every AVM module reference, current version, and source line.
- Identify all unique
avm/res/{service}/{resource} modules.
- Fetch the MCR tags list for each module from
https://mcr.microsoft.com/v2/bicep/avm/res/{service}/{resource}/tags/list.
- Parse the JSON
tags array, keep semantic versions, and compare the latest stable version with the current reference.
- For each candidate update, review docs and release notes from
https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource} for breaking changes.
- Apply non-breaking version updates and required parameter changes while preserving Bicep formatting and module intent.
- Pause or report manual review required before applying updates that involve incompatible parameter changes, security/compliance modifications, or behavioral changes.
- Run
bicep lint ${file} and bicep build ${file}. Fix validation issues caused by the update.
- Output only the final table and summary; limit progress updates to non-breaking changes.
Breaking change policy
| Change type |
Action |
| Compatible version bump |
Update in place and validate. |
| Required parameter renamed, removed, or type-changed |
Mark Manual review required; do not force the update without approval. |
| Security/compliance modification |
Mark Manual review required with the docs link and risk. |
| Behavioral default change |
Mark Manual review required and describe the behavior. |
| Validation failure after update |
Mark Failed, revert or leave the file valid, and summarize the issue. |
Tooling notes
Use portable CLI capabilities: read or grep for module references, web fetch for MCR tags and docs, edit the Bicep file, and execute bicep lint / bicep build. Ignore legacy VS Code-only tool tokens from the older prompt form: #search, #searchResults, #fetch, #editFiles, #runCommands, and #todos.
Output template
| Module | Current | Latest | Status | Action | Docs |
|--------|---------|--------|--------|--------|------|
| avm/res/compute/vm | 0.1.0 | 0.2.0 | Updated | Updated version and compatible parameters | [Docs](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}) |
| avm/res/storage/account | 0.3.0 | 0.3.0 | Current | Current | [Docs](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}) |
| avm/res/network/virtual-network | 0.4.0 | 0.5.0 | Manual review required | PAUSE for approval before breaking parameter changes | [Docs](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}) |
### Summary of Updates
Describe updates made, validation results from `bicep lint` and `bicep build`, manual reviews needed, and issues encountered.
Quality gate
References
1---2name: update-avm-modules-in-bicep3description: Update Azure Verified Modules (AVM) references in Bicep files by discovering avm/res modules, comparing MCR tag versions, reviewing breaking changes, editing versions and parameters, and validating with bicep lint and bicep build. Use when asked to update AVM modules in Bicep.4---56<!-- Generated from harness/github-copilot/skills/update-avm-modules-in-bicep/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Update AVM modules in Bicep910Update a Bicep file to the latest compatible Azure Verified Modules (AVM) versions by scanning `avm/res/{service}/{resource}` references, checking MCR tags, reviewing breaking changes, editing safely, and validating the result.1112## When to invoke1314- "Update Azure Verified Modules in this Bicep file."15- "Check AVM module versions and bump them safely."16- "Use MCR tags to update `avm/res` references."17- "Run `bicep lint` and `bicep build` after updating AVM modules."1819## Prerequisites and context2021- A target Bicep file such as `${file}` must be available.22- `bicep` must be installed to run `bicep lint` and `bicep build`.23- Network access must allow tag discovery from `https://mcr.microsoft.com/v2/bicep/avm/res/{service}/{resource}/tags/list` and documentation review at `https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}`.2425## AVM discovery rules2627| Item | Rule |28| --- | --- |29| Module pattern | Match Azure Verified Modules in Bicep references using `avm/res/{service}/{resource}`. |30| Version source | Use the MCR tags API only for version discovery. |31| Tags endpoint | `https://mcr.microsoft.com/v2/bicep/avm/res/{service}/{resource}/tags/list`. |32| Docs endpoint | `https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}`. |33| Version comparison | Parse the JSON `tags` array and sort by semantic versioning. |34| Uniqueness | Check each unique AVM module once, then apply all occurrences. |3536## Procedure37381. Scan `${file}` and extract every AVM module reference, current version, and source line.392. Identify all unique `avm/res/{service}/{resource}` modules.403. Fetch the MCR tags list for each module from `https://mcr.microsoft.com/v2/bicep/avm/res/{service}/{resource}/tags/list`.414. Parse the JSON `tags` array, keep semantic versions, and compare the latest stable version with the current reference.425. For each candidate update, review docs and release notes from `https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}` for breaking changes.436. Apply non-breaking version updates and required parameter changes while preserving Bicep formatting and module intent.447. Pause or report manual review required before applying updates that involve incompatible parameter changes, security/compliance modifications, or behavioral changes.458. Run `bicep lint ${file}` and `bicep build ${file}`. Fix validation issues caused by the update.469. Output only the final table and summary; limit progress updates to non-breaking changes.4748## Breaking change policy4950| Change type | Action |51| --- | --- |52| Compatible version bump | Update in place and validate. |53| Required parameter renamed, removed, or type-changed | Mark `Manual review required`; do not force the update without approval. |54| Security/compliance modification | Mark `Manual review required` with the docs link and risk. |55| Behavioral default change | Mark `Manual review required` and describe the behavior. |56| Validation failure after update | Mark `Failed`, revert or leave the file valid, and summarize the issue. |5758## Tooling notes5960Use portable CLI capabilities: read or grep for module references, web fetch for MCR tags and docs, edit the Bicep file, and execute `bicep lint` / `bicep build`. Ignore legacy VS Code-only tool tokens from the older prompt form: `#search`, `#searchResults`, `#fetch`, `#editFiles`, `#runCommands`, and `#todos`.6162## Output template6364```markdown65| Module | Current | Latest | Status | Action | Docs |66|--------|---------|--------|--------|--------|------|67| avm/res/compute/vm | 0.1.0 | 0.2.0 | Updated | Updated version and compatible parameters | [Docs](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}) |68| avm/res/storage/account | 0.3.0 | 0.3.0 | Current | Current | [Docs](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}) |69| avm/res/network/virtual-network | 0.4.0 | 0.5.0 | Manual review required | PAUSE for approval before breaking parameter changes | [Docs](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource}) |7071### Summary of Updates7273Describe updates made, validation results from `bicep lint` and `bicep build`, manual reviews needed, and issues encountered.74```7576## Quality gate7778- [ ] Every `avm/res/{service}/{resource}` reference in `${file}` was inventoried.79- [ ] Version discovery used only the MCR tags API and parsed the JSON `tags` array with semantic version sorting.80- [ ] Absolute URLs for MCR tags and AVM docs are preserved for every checked module.81- [ ] Breaking changes are not applied without approval; they are marked `Manual review required`.82- [ ] Updated Bicep remains valid and formatted for the changed references.83- [ ] `bicep lint ${file}` and `bicep build ${file}` pass, or failures are reported as `Failed` with evidence.84- [ ] The final answer contains only the results table and `### Summary of Updates`.8586## References8788- [Azure Verified Modules registry source](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/{service}/{resource})89- [MCR AVM tags endpoint](https://mcr.microsoft.com/v2/bicep/avm/res/{service}/{resource}/tags/list)