Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
0.10.2
(Optional) Correlation Id
N/A
Description
Follow-up from #204 / PR #308.
PR #308 added consumer-facing usage examples to the submodule docs, each pinning the module version:
module "keyvault_secret" {
source = "Azure/avm-res-keyvault-vault/azurerm//modules/secret"
version = "0.10.2"
# ...
}
The version is hardcoded in modules/key/_header.md and modules/secret/_header.md. Nothing in the release process updates those files, so the moment 0.10.3 ships the published documentation advertises a stale pin. Every subsequent release widens the gap, and the drift is silent — the docs still generate cleanly and CI stays green, because terraform-docs copies _header.md verbatim into README.md without validating its contents.
This is not specific to the two files added in #308. It applies to any version pin baked into an _header.md anywhere in this repo, including the root _header.md if a usage example is ever added there. Worth solving generically rather than patching the two current instances.
Possible approaches (not prescriptive — whichever fits the AVM tooling best):
- Have the release automation rewrite
version = "x.y.z" occurrences in _header.md files as part of the release commit, then regenerate docs.
- Replace the literal pin with a placeholder plus a pointer to the registry's version list, accepting that the example is then not copy-pasteable as-is.
- Add a CI check that fails when a version pin in an
_header.md does not match the latest published release, converting silent drift into a visible failure.
Option 1 keeps the examples copy-pasteable and correct, which was the point of #204 in the first place, but it needs a hook in the release workflow. Option 3 is the cheapest to implement and at least makes the problem loud.
Files currently affected:
modules/key/_header.md
modules/secret/_header.md
Drafted by Claude Opus 5.
Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
0.10.2
(Optional) Correlation Id
N/A
Description
Follow-up from #204 / PR #308.
PR #308 added consumer-facing usage examples to the submodule docs, each pinning the module version:
The version is hardcoded in
modules/key/_header.mdandmodules/secret/_header.md. Nothing in the release process updates those files, so the moment0.10.3ships the published documentation advertises a stale pin. Every subsequent release widens the gap, and the drift is silent — the docs still generate cleanly and CI stays green, becauseterraform-docscopies_header.mdverbatim intoREADME.mdwithout validating its contents.This is not specific to the two files added in #308. It applies to any version pin baked into an
_header.mdanywhere in this repo, including the root_header.mdif a usage example is ever added there. Worth solving generically rather than patching the two current instances.Possible approaches (not prescriptive — whichever fits the AVM tooling best):
version = "x.y.z"occurrences in_header.mdfiles as part of the release commit, then regenerate docs._header.mddoes not match the latest published release, converting silent drift into a visible failure.Option 1 keeps the examples copy-pasteable and correct, which was the point of #204 in the first place, but it needs a hook in the release workflow. Option 3 is the cheapest to implement and at least makes the problem loud.
Files currently affected:
modules/key/_header.mdmodules/secret/_header.mdDrafted by Claude Opus 5.