{"id":14957944,"url":"https://github.com/keilerkonzept/terraform-module-versions","last_synced_at":"2025-04-13T07:47:47.048Z","repository":{"id":36817158,"uuid":"200437970","full_name":"keilerkonzept/terraform-module-versions","owner":"keilerkonzept","description":"CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows. #golang #cli #terraform","archived":false,"fork":false,"pushed_at":"2025-03-13T20:35:31.000Z","size":18204,"stargazers_count":193,"open_issues_count":16,"forks_count":30,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T07:47:37.718Z","etag":null,"topics":["cli","git","json","repository","semver","terraform","terraform-modules","update","versioning"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keilerkonzept.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-04T01:47:34.000Z","updated_at":"2025-03-30T12:05:59.000Z","dependencies_parsed_at":"2023-12-05T02:27:49.348Z","dependency_job_id":"95634ac8-72a8-4265-9cb3-86191a4ce8c8","html_url":"https://github.com/keilerkonzept/terraform-module-versions","commit_stats":{"total_commits":198,"total_committers":7,"mean_commits":"28.285714285714285","dds":0.4949494949494949,"last_synced_commit":"38452aced2876acdfa1f7af7b56509d81bc82a7f"},"previous_names":[],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keilerkonzept%2Fterraform-module-versions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keilerkonzept%2Fterraform-module-versions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keilerkonzept%2Fterraform-module-versions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keilerkonzept%2Fterraform-module-versions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keilerkonzept","download_url":"https://codeload.github.com/keilerkonzept/terraform-module-versions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681494,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","git","json","repository","semver","terraform","terraform-modules","update","versioning"],"created_at":"2024-09-24T13:15:52.127Z","updated_at":"2025-04-13T07:47:47.025Z","avatar_url":"https://github.com/keilerkonzept.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# terraform-module-versions\n\nChecks for updates of external terraform modules referenced in given Terraform source. Outputs Markdown tables by default, as well as JSONL (`-o jsonl`, one JSON object per line), JSON (`-o json`), and JUnit XML (`-o junit`).\n\nSupported module sources:\n\n- **Git** with SemVer tags\n  - `git::...`\n  - `github.com/...`\n  - `git@github.com:...`\n- **Terraform Registry**\n  - public `\u003cNAMESPACE\u003e/\u003cNAME\u003e/\u003cSYSTEM\u003e`\n  - private `\u003cHOSTNAME\u003e/\u003cNAMESPACE\u003e/\u003cNAME\u003e/\u003cSYSTEM\u003e`\n\n## Example\n\n```sh\n$ terraform-module-versions check examples\n```\n\n```markdown\n| UPDATE? |               NAME               | CONSTRAINT | VERSION | LATEST MATCHING | LATEST  |\n|---------|----------------------------------|------------|---------|-----------------|---------|\n| (Y)     | consul                           | ~0.7.3     |         | 0.7.11          | 0.11.0  |\n| (Y)     | consul_github_https              | 0.8.0      | v0.8.0  |                 | v0.11.0 |\n| (Y)     | consul_github_https_missing_ref  | 0.7.3      |         | v0.7.3          | v0.11.0 |\n| (Y)     | consul_github_https_no_ref       |            |         |                 | v0.11.0 |\n| Y       | consul_github_ssh                | ~0.1.0     | 0.1.0   | v0.1.2          | v0.11.0 |\n| (Y)     | example_git_scp                  | ~\u003e 0.12    | 0.12.0  |                 | v3.3.4  |\n| (Y)     | example_git_ssh_branch           |            | master  |                 | v3.3.4  |\n| (Y)     | example_with_prerelease_versions |            | v0.22.2 |                 | v0.32.1 |\n```\n\n## Contents\n\n- [terraform-module-versions](#app)\n  - [Example](#example)\n  - [Contents](#contents)\n  - [Examples](#examples)\n    - [List modules with their current versions](#list-modules-with-their-current-versions)\n    - [Check for module updates](#check-for-module-updates)\n    - [Check for module updates using Github Token authentication](#check-for-module-updates-using-github-token-authentication)\n    - [Check for updates of specific modules](#check-for-updates-of-specific-modules)\n  - [Get it](#get-it)\n  - [Usage](#usage)\n    - [`list`](#list)\n    - [`check`](#check)\n\n## Examples\n\n```sh\n$ cat examples/main.tf\n```\n\n```terraform\nmodule \"consul\" {\n  source = \"hashicorp/consul/aws\"\n  version = \"~0.7.3\"\n}\n\nmodule \"consul_github_https_missing_ref\" {\n  source = \"github.com/hashicorp/terraform-aws-consul\"\n  version = \"0.7.3\"\n}\n\nmodule \"consul_github_https_no_ref\" {\n  source = \"github.com/hashicorp/terraform-aws-consul\"\n}\n\nmodule \"consul_github_https\" {\n  source = \"github.com/hashicorp/terraform-aws-consul?ref=v0.8.0\"\n  version = \"0.8.0\"\n}\n\nmodule \"consul_github_ssh\" {\n  source = \"git@github.com:hashicorp/terraform-aws-consul?ref=0.1.0\"\n  version = \"~0.1.0\"\n}\n\nmodule \"example_git_ssh_branch\" {\n  source = \"git::ssh://git@github.com/keilerkonzept/terraform-module-versions?ref=master\"\n}\n\nmodule \"example_git_scp\" {\n  source = \"git::git@github.com:keilerkonzept/terraform-module-versions?ref=0.12.0\"\n  version = \"~\u003e 0.12\"\n}\n\nmodule \"example_with_prerelease_versions\" {\n  source = \"git@github.com:kubernetes/api.git?ref=v0.22.2\"\n}\n\nmodule \"local\" {\n  source = \"./local\"\n}\n\nvariable \"_0_15_sensitive_example\" {\n  type      = string\n  sensitive = true\n}\n\noutput \"0_15_sensitive_example\" {\n  value = \"foo-${var._0_15_sensitive_example}\"\n  sensitive = true\n}\n\noutput \"0_15_nonsensitive_example\" {\n  value = nonsensitive(var._0_15_sensitive_example)\n}\n```\n\n### List modules with their current versions\n\n```sh\n# list modules with their current versions and version constraints (if specified)\n$ terraform-module-versions list examples\n```\n\n|   TYPE   |               NAME               | CONSTRAINT | VERSION |                                    SOURCE                                    |\n|----------|----------------------------------|------------|---------|------------------------------------------------------------------------------|\n| registry | consul                           | ~0.7.3     |         | hashicorp/consul/aws                                                         |\n| local    | local                            |            |         | ./local                                                                      |\n| git      | example_with_prerelease_versions |            | v0.22.2 | git@github.com:kubernetes/api.git?ref=v0.22.2                                |\n| git      | example_git_ssh_branch           |            | master  | git::ssh://git@github.com/keilerkonzept/terraform-module-versions?ref=master |\n| git      | example_git_scp                  | ~\u003e 0.12    | 0.12.0  | git::git@github.com:keilerkonzept/terraform-module-versions?ref=0.12.0       |\n| git      | consul_github_ssh                | ~0.1.0     | 0.1.0   | git@github.com:hashicorp/terraform-aws-consul?ref=0.1.0                      |\n| git      | consul_github_https_no_ref       |            |         | github.com/hashicorp/terraform-aws-consul                                    |\n| git      | consul_github_https_missing_ref  | 0.7.3      |         | github.com/hashicorp/terraform-aws-consul                                    |\n| git      | consul_github_https              | 0.8.0      | v0.8.0  | github.com/hashicorp/terraform-aws-consul?ref=v0.8.0                         |\n\nwith `-o json`:\n\n```json\n[\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul\",\n    \"type\": \"registry\",\n    \"source\": \"hashicorp/consul/aws\",\n    \"constraint\": \"~0.7.3\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_https\",\n    \"type\": \"git\",\n    \"source\": \"github.com/hashicorp/terraform-aws-consul?ref=v0.8.0\",\n    \"constraint\": \"0.8.0\",\n    \"version\": \"v0.8.0\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_https_missing_ref\",\n    \"type\": \"git\",\n    \"source\": \"github.com/hashicorp/terraform-aws-consul\",\n    \"constraint\": \"0.7.3\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_https_no_ref\",\n    \"type\": \"git\",\n    \"source\": \"github.com/hashicorp/terraform-aws-consul\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_ssh\",\n    \"type\": \"git\",\n    \"source\": \"git@github.com:hashicorp/terraform-aws-consul?ref=0.1.0\",\n    \"constraint\": \"~0.1.0\",\n    \"version\": \"0.1.0\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"example_git_scp\",\n    \"type\": \"git\",\n    \"source\": \"git::git@github.com:keilerkonzept/terraform-module-versions?ref=0.12.0\",\n    \"constraint\": \"~\u003e 0.12\",\n    \"version\": \"0.12.0\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"example_git_ssh_branch\",\n    \"type\": \"git\",\n    \"source\": \"git::ssh://git@github.com/keilerkonzept/terraform-module-versions?ref=master\",\n    \"version\": \"master\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"example_with_prerelease_versions\",\n    \"type\": \"git\",\n    \"source\": \"git@github.com:kubernetes/api.git?ref=v0.22.2\",\n    \"version\": \"v0.22.2\"\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"local\",\n    \"type\": \"local\",\n    \"source\": \"./local\"\n  }\n]\n```\n\n### Check for module updates\n\n```sh\n# check: check for module updates from (usually) remote sources\n$ terraform-module-versions check examples\n```\n\n| UPDATE? |               NAME               | CONSTRAINT | VERSION | LATEST MATCHING | LATEST  |\n|---------|----------------------------------|------------|---------|-----------------|---------|\n| (Y)     | consul                           | ~0.7.3     |         | 0.7.11          | 0.11.0  |\n| (Y)     | consul_github_https              | 0.8.0      | v0.8.0  |                 | v0.11.0 |\n| (Y)     | consul_github_https_missing_ref  | 0.7.3      |         | v0.7.3          | v0.11.0 |\n| (Y)     | consul_github_https_no_ref       |            |         |                 | v0.11.0 |\n| Y       | consul_github_ssh                | ~0.1.0     | 0.1.0   | v0.1.2          | v0.11.0 |\n| (Y)     | example_git_scp                  | ~\u003e 0.12    | 0.12.0  |                 | v3.3.4  |\n| (Y)     | example_git_ssh_branch           |            | master  |                 | v3.3.4  |\n| (Y)     | example_with_prerelease_versions |            | v0.22.2 |                 | v0.32.1 |\n\nwith `-o json`:\n\n```json\n[\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul\",\n    \"source\": \"hashicorp/consul/aws\",\n    \"constraint\": \"~0.7.3\",\n    \"latestMatching\": \"0.7.11\",\n    \"latestOverall\": \"0.11.0\",\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_https\",\n    \"source\": \"github.com/hashicorp/terraform-aws-consul?ref=v0.8.0\",\n    \"constraint\": \"0.8.0\",\n    \"version\": \"v0.8.0\",\n    \"latestOverall\": \"v0.11.0\",\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_https_missing_ref\",\n    \"source\": \"github.com/hashicorp/terraform-aws-consul\",\n    \"constraint\": \"0.7.3\",\n    \"latestMatching\": \"v0.7.3\",\n    \"latestOverall\": \"v0.11.0\",\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_https_no_ref\",\n    \"source\": \"github.com/hashicorp/terraform-aws-consul\",\n    \"latestOverall\": \"v0.11.0\",\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_ssh\",\n    \"source\": \"git@github.com:hashicorp/terraform-aws-consul?ref=0.1.0\",\n    \"constraint\": \"~0.1.0\",\n    \"version\": \"0.1.0\",\n    \"latestMatching\": \"v0.1.2\",\n    \"latestOverall\": \"v0.11.0\",\n    \"matchingUpdate\": true,\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"example_git_scp\",\n    \"source\": \"git::git@github.com:keilerkonzept/terraform-module-versions?ref=0.12.0\",\n    \"constraint\": \"~\u003e 0.12\",\n    \"version\": \"0.12.0\",\n    \"latestOverall\": \"v3.3.4\",\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"example_git_ssh_branch\",\n    \"source\": \"git::ssh://git@github.com/keilerkonzept/terraform-module-versions?ref=master\",\n    \"version\": \"master\",\n    \"latestOverall\": \"v3.3.4\",\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"example_with_prerelease_versions\",\n    \"source\": \"git@github.com:kubernetes/api.git?ref=v0.22.2\",\n    \"version\": \"v0.22.2\",\n    \"latestOverall\": \"v0.32.1\",\n    \"nonMatchingUpdate\": true\n  }\n]\n```\n\n```sh\n# check -all: check for updates, include up-to-date-modules in output\n$ terraform-module-versions check -all examples\n```\n\n| UPDATE? |               NAME               | CONSTRAINT | VERSION | LATEST MATCHING | LATEST  |\n|---------|----------------------------------|------------|---------|-----------------|---------|\n| (Y)     | consul                           | ~0.7.3     |         | 0.7.11          | 0.11.0  |\n| (Y)     | consul_github_https              | 0.8.0      | v0.8.0  |                 | v0.11.0 |\n| (Y)     | consul_github_https_missing_ref  | 0.7.3      |         | v0.7.3          | v0.11.0 |\n| (Y)     | consul_github_https_no_ref       |            |         |                 | v0.11.0 |\n| Y       | consul_github_ssh                | ~0.1.0     | 0.1.0   | v0.1.2          | v0.11.0 |\n| (Y)     | example_git_scp                  | ~\u003e 0.12    | 0.12.0  |                 | v3.3.4  |\n| (Y)     | example_git_ssh_branch           |            | master  |                 | v3.3.4  |\n| (Y)     | example_with_prerelease_versions |            | v0.22.2 |                 | v0.32.1 |\n| ?       | local                            |            |         |                 |         |\n\n### Check for module updates using Github Token authentication\n\n```sh\n$ export GITHUB_TOKEN=\"\u003cyour Github PAT\u003e\"\n$ terraform-module-versions check examples\n```\n\n### Check for updates of specific modules\n\n```sh\n# check -module: check for updates of specific modules\n$ terraform-module-versions check -all -module=consul_github_https -module=consul_github_ssh examples\n```\n\n| UPDATE? |        NAME         | CONSTRAINT | VERSION | LATEST MATCHING | LATEST  |\n|---------|---------------------|------------|---------|-----------------|---------|\n| (Y)     | consul_github_https | 0.8.0      | v0.8.0  |                 | v0.11.0 |\n| Y       | consul_github_ssh   | ~0.1.0     | 0.1.0   | v0.1.2          | v0.11.0 |\n\n```sh\n# check -module: check for updates of specific modules\n$ terraform-module-versions check -module=consul_github_https -module=consul_github_ssh examples\n```\n\n| UPDATE? |        NAME         | CONSTRAINT | VERSION | LATEST MATCHING | LATEST  |\n|---------|---------------------|------------|---------|-----------------|---------|\n| (Y)     | consul_github_https | 0.8.0      | v0.8.0  |                 | v0.11.0 |\n| Y       | consul_github_ssh   | ~0.1.0     | 0.1.0   | v0.1.2          | v0.11.0 |\n\nwith `-o json`:\n\n```json\n[\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_https\",\n    \"source\": \"github.com/hashicorp/terraform-aws-consul?ref=v0.8.0\",\n    \"constraint\": \"0.8.0\",\n    \"version\": \"v0.8.0\",\n    \"latestOverall\": \"v0.11.0\",\n    \"nonMatchingUpdate\": true\n  },\n  {\n    \"path\": \"examples/main.tf\",\n    \"name\": \"consul_github_ssh\",\n    \"source\": \"git@github.com:hashicorp/terraform-aws-consul?ref=0.1.0\",\n    \"constraint\": \"~0.1.0\",\n    \"version\": \"0.1.0\",\n    \"latestMatching\": \"v0.1.2\",\n    \"latestOverall\": \"v0.11.0\",\n    \"matchingUpdate\": true,\n    \"nonMatchingUpdate\": true\n  }\n]\n```\n\n## Get it\n\nUsing go get:\n\n```bash\ngo install github.com/keilerkonzept/terraform-module-versions/v3@latest\n```\n\nOr [download the binary for your platform](https://github.com/keilerkonzept/terraform-module-versions/releases/latest) from the releases page.\n\n## Usage\n\n```text\nUSAGE\n  terraform-module-versions [options] \u003csubcommand\u003e\n\nSUBCOMMANDS\n  list     List referenced terraform modules with their detected versions\n  check    Check referenced terraform modules' sources for newer versions\n  version  Print version and exit\n\nFLAGS\n  -o markdown       (alias for -output)\n  -output markdown  output format, one of [json jsonl junit markdown markdown-wide]\n  -q=false          (alias for -quiet)\n  -quiet=false      suppress log output (stderr)\n```\n\n### `list`\n\n```text\nDESCRIPTION\n  List referenced terraform modules with their detected versions\n\nUSAGE\n  terraform-module-versions list [options] [\u003cpath\u003e ...]\n\nList referenced terraform modules with their detected versions\n\nFLAGS\n  -module value     include this module (may be specified repeatedly. by default, all modules are included)\n  -o markdown       (alias for -output)\n  -output markdown  output format, one of [json jsonl junit markdown markdown-wide]\n```\n\n### `check`\n\n```text\nDESCRIPTION\n  Check referenced terraform modules' sources for newer versions\n\nUSAGE\n  terraform-module-versions check [options] [\u003cpath\u003e ...]\n\nCheck referenced terraform modules' sources for newer versions\n\nFLAGS\n  -H value                               (alias for -registry-header)\n  -a=false                               (alias for -all)\n  -all=false                             include modules without updates\n  -any-updates-found-nonzero-exit=false  exit with a nonzero code when modules with updates are found (ignoring version constraints)\n  -e=false                               (alias for -updates-found-nonzero-exit)\n  -module value                          include this module (may be specified repeatedly. by default, all modules are included)\n  -n=false                               (alias for -any-updates-found-nonzero-exit)\n  -o markdown                            (alias for -output)\n  -output markdown                       output format, one of [json jsonl junit markdown markdown-wide]\n  -pre-release=false                     include pre-release versions\n  -registry-header value                 extra HTTP headers for requests to Terraform module registries (a key/value pair KEY:VALUE, may be specified repeatedly)\n  -sed=false                             generate sed statements for upgrade\n  -updates-found-nonzero-exit=false      exit with a nonzero code when modules with updates matching are found (respecting version constraints)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeilerkonzept%2Fterraform-module-versions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeilerkonzept%2Fterraform-module-versions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeilerkonzept%2Fterraform-module-versions/lists"}