This tool is specifically designed for the AVM (Azure Verified Modules) team for Terraform. It automates the process of:
- Monitoring multiple Azure Verified Module repositories.
- Checking Terraform provider version compatibility (especially for
azurermandazapi). - Gathering metadata (e.g., last commit date and author).
- Generating a JSON report for further analysis.
While this tool is not intended to be a generic solution for all Terraform modules, it could inspire others who need to manage multiple repositories and track Terraform provider versions.
-
Download/Update the Source CSV
Fetches a CSV listing Terraform modules/repositories from a remote URL. -
Process CSV Entries
- Clones each repo and inspects the Terraform module constraints.
- Checks for compatibility against known minimum provider versions.
- Collects metadata (last commit date and author).
- Outputs a JSON file with all results.
-
Analysis
- Provides a built-in subcommand for additional statistics, such as:
- Unreachable repositories (those that fail to clone).
- Dormant repositories (no commits in the last 6 months).
- Not-compatible repositories (e.g.,
azurermorazapiconstraints not satisfied).
- Prints colorized summaries to the console.
- Provides a built-in subcommand for additional statistics, such as:
-
Install Go (1.23+ recommended).
-
Clone this repository:
git clone https://github.com/Nepomuceno/avm-version-check.git cd avm-version-check -
Build:
go build -o avm-version-check main.go
-
Check the CLI help:
./avm-version-check --help
./avm-version-check update-source \
--url https://raw.githubusercontent.com/Azure/Azure-Verified-Modules/refs/heads/main/docs/static/module-indexes/TerraformResourceModules.csv \
--output modules.csv- Use
--forceto overwritemodules.csvif it already exists.
./avm-version-check process \
--input modules.csv \
--output output.json \
--workers 5 \
--download \
--quiet--downloadfetches the CSV file before processing, even if you already have it locally.--quietsuppresses log warnings so you primarily see the progress bar and a final summary.--workersdetermines concurrency when cloning/parsing repositories.
At the end of processing, the tool prints a summary of unreachable, dormant, and not-compatible repositories directly to the console.
If you want a more detailed analysis with colorized output, run:
./avm-version-check analysis --input output.jsonThis will print detailed lists of:
- Unreachable repositories
- Dormant repositories
- Not-compatible repositories
We welcome improvements and suggestions! Feel free to open issues and PRs that may help the AVM team or even expand this tool’s applicability.