Coder Social home page Coder Social logo

keilerkonzept / terraform-module-versions Goto Github PK

View Code? Open in Web Editor NEW
188.0 4.0 27.0 15.67 MB

CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows. #golang #cli #terraform

License: MIT License

Makefile 9.01% Go 90.99%
terraform terraform-modules semver versioning update git repository json cli

terraform-module-versions's Introduction

terraform-module-versions

Checks 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).

Supported module sources:

  • Git with SemVer tags
  • Terraform Registry
    • public <NAMESPACE>/<NAME>/<PROVIDER>
    • private <HOSTNAME>/<NAMESPACE>/<NAME>/<PROVIDER>

Example

$ terraform-module-versions check examples
| UPDATE? |               NAME               | CONSTRAINT | VERSION | LATEST MATCHING | LATEST  |
|---------|----------------------------------|------------|---------|-----------------|---------|
| (Y)     | consul                           | ~0.7.3     |         | 0.7.11          | 0.11.0  |
| (Y)     | consul_github_https              | 0.8.0      | v0.8.0  |                 | v0.11.0 |
| (Y)     | consul_github_https_missing_ref  | 0.7.3      |         | v0.7.3          | v0.11.0 |
| (Y)     | consul_github_https_no_ref       |            |         |                 | v0.11.0 |
| Y       | consul_github_ssh                | ~0.1.0     | 0.1.0   | v0.1.2          | v0.11.0 |
| (Y)     | example_git_scp                  | ~> 0.12    | 0.12.0  |                 | 3.1.5   |
| (Y)     | example_git_ssh_branch           |            | master  |                 | 3.1.5   |
| (Y)     | example_with_prerelease_versions |            | v0.22.2 |                 | v0.22.3 |

Contents

Examples

$ cat examples/main.tf
module "consul" {
  source = "hashicorp/consul/aws"
  version = "~0.7.3"
}

module "consul_github_https_missing_ref" {
  source = "github.com/hashicorp/terraform-aws-consul"
  version = "0.7.3"
}

module "consul_github_https_no_ref" {
  source = "github.com/hashicorp/terraform-aws-consul"
}

module "consul_github_https" {
  source = "github.com/hashicorp/terraform-aws-consul?ref=v0.8.0"
  version = "0.8.0"
}

module "consul_github_ssh" {
  source = "[email protected]:hashicorp/terraform-aws-consul?ref=0.1.0"
  version = "~0.1.0"
}

module "example_git_ssh_branch" {
  source = "git::ssh://[email protected]/keilerkonzept/terraform-module-versions?ref=master"
}

module "example_git_scp" {
  source = "git::[email protected]:keilerkonzept/terraform-module-versions?ref=0.12.0"
  version = "~> 0.12"
}

module "example_with_prerelease_versions" {
  source = "[email protected]:kubernetes/api.git?ref=v0.22.2"
}

module "local" {
  source = "./local"
}

variable "_0_15_sensitive_example" {
  type      = string
  sensitive = true
}

output "0_15_sensitive_example" {
  value = "foo-${var._0_15_sensitive_example}"
  sensitive = true
}

output "0_15_nonsensitive_example" {
  value = nonsensitive(var._0_15_sensitive_example)
}

List modules with their current versions

# list modules with their current versions and version constraints (if specified)
$ terraform-module-versions list examples
TYPE NAME CONSTRAINT VERSION SOURCE
registry consul ~0.7.3 hashicorp/consul/aws
local local ./local
git example_with_prerelease_versions v0.22.2 [email protected]:kubernetes/api.git?ref=v0.22.2
git example_git_ssh_branch master git::ssh://[email protected]/keilerkonzept/terraform-module-versions?ref=master
git example_git_scp ~> 0.12 0.12.0 git::[email protected]:keilerkonzept/terraform-module-versions?ref=0.12.0
git consul_github_ssh ~0.1.0 0.1.0 [email protected]:hashicorp/terraform-aws-consul?ref=0.1.0
git consul_github_https_no_ref github.com/hashicorp/terraform-aws-consul
git consul_github_https_missing_ref 0.7.3 github.com/hashicorp/terraform-aws-consul
git consul_github_https 0.8.0 v0.8.0 github.com/hashicorp/terraform-aws-consul?ref=v0.8.0

with -o json:

[
  {
    "path": "examples/main.tf",
    "name": "consul",
    "type": "registry",
    "source": "hashicorp/consul/aws",
    "constraint": "~0.7.3"
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_https",
    "type": "git",
    "source": "github.com/hashicorp/terraform-aws-consul?ref=v0.8.0",
    "constraint": "0.8.0",
    "version": "v0.8.0"
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_https_missing_ref",
    "type": "git",
    "source": "github.com/hashicorp/terraform-aws-consul",
    "constraint": "0.7.3"
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_https_no_ref",
    "type": "git",
    "source": "github.com/hashicorp/terraform-aws-consul"
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_ssh",
    "type": "git",
    "source": "[email protected]:hashicorp/terraform-aws-consul?ref=0.1.0",
    "constraint": "~0.1.0",
    "version": "0.1.0"
  },
  {
    "path": "examples/main.tf",
    "name": "example_git_scp",
    "type": "git",
    "source": "git::[email protected]:keilerkonzept/terraform-module-versions?ref=0.12.0",
    "constraint": "~> 0.12",
    "version": "0.12.0"
  },
  {
    "path": "examples/main.tf",
    "name": "example_git_ssh_branch",
    "type": "git",
    "source": "git::ssh://[email protected]/keilerkonzept/terraform-module-versions?ref=master",
    "version": "master"
  },
  {
    "path": "examples/main.tf",
    "name": "example_with_prerelease_versions",
    "type": "git",
    "source": "[email protected]:kubernetes/api.git?ref=v0.22.2",
    "version": "v0.22.2"
  },
  {
    "path": "examples/main.tf",
    "name": "local",
    "type": "local",
    "source": "./local"
  }
]

Check for module updates

# check: check for module updates from (usually) remote sources
$ terraform-module-versions check examples
UPDATE? NAME CONSTRAINT VERSION LATEST MATCHING LATEST
(Y) consul ~0.7.3 0.7.11 0.11.0
(Y) consul_github_https 0.8.0 v0.8.0 v0.11.0
(Y) consul_github_https_missing_ref 0.7.3 v0.7.3 v0.11.0
(Y) consul_github_https_no_ref v0.11.0
Y consul_github_ssh ~0.1.0 0.1.0 v0.1.2 v0.11.0
(Y) example_git_scp ~> 0.12 0.12.0 3.1.5
(Y) example_git_ssh_branch master 3.1.5
(Y) example_with_prerelease_versions v0.22.2 v0.22.3

with -o json:

[
  {
    "path": "examples/main.tf",
    "name": "consul",
    "source": "hashicorp/consul/aws",
    "constraint": "~0.7.3",
    "latestMatching": "0.7.11",
    "latestOverall": "0.11.0",
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_https",
    "source": "github.com/hashicorp/terraform-aws-consul?ref=v0.8.0",
    "constraint": "0.8.0",
    "version": "v0.8.0",
    "latestOverall": "v0.11.0",
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_https_missing_ref",
    "source": "github.com/hashicorp/terraform-aws-consul",
    "constraint": "0.7.3",
    "latestMatching": "v0.7.3",
    "latestOverall": "v0.11.0",
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_https_no_ref",
    "source": "github.com/hashicorp/terraform-aws-consul",
    "latestOverall": "v0.11.0",
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_ssh",
    "source": "[email protected]:hashicorp/terraform-aws-consul?ref=0.1.0",
    "constraint": "~0.1.0",
    "version": "0.1.0",
    "latestMatching": "v0.1.2",
    "latestOverall": "v0.11.0",
    "matchingUpdate": true,
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "example_git_scp",
    "source": "git::[email protected]:keilerkonzept/terraform-module-versions?ref=0.12.0",
    "constraint": "~> 0.12",
    "version": "0.12.0",
    "latestOverall": "3.1.5",
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "example_git_ssh_branch",
    "source": "git::ssh://[email protected]/keilerkonzept/terraform-module-versions?ref=master",
    "version": "master",
    "latestOverall": "3.1.5",
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "example_with_prerelease_versions",
    "source": "[email protected]:kubernetes/api.git?ref=v0.22.2",
    "version": "v0.22.2",
    "latestOverall": "v0.22.3",
    "nonMatchingUpdate": true
  }
]
# check -all: check for updates, include up-to-date-modules in output
$ terraform-module-versions check -all examples
UPDATE? NAME CONSTRAINT VERSION LATEST MATCHING LATEST
(Y) consul ~0.7.3 0.7.11 0.11.0
(Y) consul_github_https 0.8.0 v0.8.0 v0.11.0
(Y) consul_github_https_missing_ref 0.7.3 v0.7.3 v0.11.0
(Y) consul_github_https_no_ref v0.11.0
Y consul_github_ssh ~0.1.0 0.1.0 v0.1.2 v0.11.0
(Y) example_git_scp ~> 0.12 0.12.0 3.1.5
(Y) example_git_ssh_branch master 3.1.5
(Y) example_with_prerelease_versions v0.22.2 v0.22.3
? local

Check for module updates using Github Token authentication

$ export GITHUB_TOKEN="<your Github PAT>"
$ terraform-module-versions check examples

Check for updates of specific modules

# check -module: check for updates of specific modules
$ terraform-module-versions check -all -module=consul_github_https -module=consul_github_ssh examples
UPDATE? NAME CONSTRAINT VERSION LATEST MATCHING LATEST
(Y) consul_github_https 0.8.0 v0.8.0 v0.11.0
Y consul_github_ssh ~0.1.0 0.1.0 v0.1.2 v0.11.0
# check -module: check for updates of specific modules
$ terraform-module-versions check -module=consul_github_https -module=consul_github_ssh examples
UPDATE? NAME CONSTRAINT VERSION LATEST MATCHING LATEST
(Y) consul_github_https 0.8.0 v0.8.0 v0.11.0
Y consul_github_ssh ~0.1.0 0.1.0 v0.1.2 v0.11.0

with -o json:

[
  {
    "path": "examples/main.tf",
    "name": "consul_github_https",
    "source": "github.com/hashicorp/terraform-aws-consul?ref=v0.8.0",
    "constraint": "0.8.0",
    "version": "v0.8.0",
    "latestOverall": "v0.11.0",
    "nonMatchingUpdate": true
  },
  {
    "path": "examples/main.tf",
    "name": "consul_github_ssh",
    "source": "[email protected]:hashicorp/terraform-aws-consul?ref=0.1.0",
    "constraint": "~0.1.0",
    "version": "0.1.0",
    "latestMatching": "v0.1.2",
    "latestOverall": "v0.11.0",
    "matchingUpdate": true,
    "nonMatchingUpdate": true
  }
]

Get it

Using go get:

go get -u github.com/keilerkonzept/terraform-module-versions

Or download the binary for your platform from the releases page.

Usage

USAGE
  terraform-module-versions [options] <subcommand>

SUBCOMMANDS
  list     List referenced terraform modules with their detected versions
  check    Check referenced terraform modules' sources for newer versions
  version  Print version and exit

FLAGS
  -o markdown       (alias for -output)
  -output markdown  output format, one of [json jsonl junit markdown markdown-wide]
  -q=false          (alias for -quiet)
  -quiet=false      suppress log output (stderr)

list

USAGE
  terraform-module-versions list [options] [<path> ...]

List referenced terraform modules with their detected versions

FLAGS
  -module ...       include this module (may be specified repeatedly. by default, all modules are included)
  -o markdown       (alias for -output)
  -output markdown  output format, one of [json jsonl junit markdown markdown-wide]

check

USAGE
  terraform-module-versions check [options] [<path> ...]

Check referenced terraform modules' sources for newer versions

FLAGS
  -H ...                                 (alias for -registry-header)
  -a=false                               (alias for -all)
  -all=false                             include modules without updates
  -any-updates-found-nonzero-exit=false  exit with a nonzero code when modules with updates are found (ignoring version constraints)
  -e=false                               (alias for -updates-found-nonzero-exit)
  -module ...                            include this module (may be specified repeatedly. by default, all modules are included)
  -n=false                               (alias for -any-updates-found-nonzero-exit)
  -o markdown                            (alias for -output)
  -output markdown                       output format, one of [json jsonl junit markdown markdown-wide]
  -pre-release=false                     include pre-release versions
  -registry-header ...                   extra HTTP headers for requests to Terraform module registries (a key/value pair KEY:VALUE, may be specified repeatedly)
  -sed=false                             generate sed statements for upgrade
  -updates-found-nonzero-exit=false      exit with a nonzero code when modules with updates matching are found (respecting version constraints)

terraform-module-versions's People

Contributors

dawidmalina avatar favoretti avatar josh-barker avatar renovate-bot avatar renovate[bot] avatar sgreben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terraform-module-versions's Issues

Homebrew formula

It would be nice to brew install this.

At the moment I'm using

go install github.com/keilerkonzept/terraform-module-versions@latest
$ which terraform-module-versions
/Users/user/go/bin/terraform-module-versions

or

wget -c https://github.com/keilerkonzept/terraform-module-versions/releases/download/3.1.11/terraform-module-versions_3.1.11_osx_x86_64.tar.gz  -O - | tar -xz
mv terraform-module-versions /usr/local/bin
$ which terraform-module-versions
/usr/local/bin/terraform-module-versions

Error on installing terraform-module-version (go install github.com/keilerkonzept/terraform-module-versions@latest)

I have problem installing go module from today morning.

What I use:
Docker: golang:latest

I test too on:
go version go version go1.19 darwin/arm64

Same error everywhere:

Error:

go: finding module for package github.com/gobwas/glob
go: finding module for package github.com/hashicorp/go-safetemp
go: finding module for package github.com/apparentlymart/go-textseg/v13/textseg
go: finding module for package github.com/jbenet/go-context/io
go: finding module for package github.com/bgentry/go-netrc/netrc
go: finding module for package golang.org/x/text/unicode/norm
go: finding module for package github.com/mattn/go-runewidth
go: finding module for package github.com/hashicorp/go-cleanhttp
go: finding module for package github.com/klauspost/compress/zstd
go: finding module for package github.com/mitchellh/go-homedir
go: finding module for package github.com/ulikunitz/xz
go: finding module for package golang.org/x/oauth2
go: finding module for package google.golang.org/api/iterator
go: finding module for package google.golang.org/api/option
go: finding module for package github.com/ProtonMail/go-crypto/openpgp
go: finding module for package github.com/go-git/go-billy/v5
go: finding module for package github.com/go-git/go-billy/v5/osfs
go: finding module for package github.com/go-git/go-billy/v5/util
go: finding module for package github.com/imdario/mergo
go: finding module for package github.com/sergi/go-diff/diffmatchpatch
go: finding module for package github.com/google/go-cmp/cmp
go: finding module for package github.com/googleapis/gax-go/v2
go: finding module for package google.golang.org/api/googleapi
go: finding module for package google.golang.org/api/storage/v1
go: finding module for package google.golang.org/api/transport/http
go: finding module for package google.golang.org/genproto/googleapis/iam/v1
go: finding module for package google.golang.org/genproto/googleapis/type/expr
go: finding module for package golang.org/x/net/idna
go: finding module for package github.com/emirpasic/gods/trees/binaryheap
go: finding module for package github.com/go-git/gcfg
go: finding module for package google.golang.org/grpc
go: finding module for package google.golang.org/grpc/codes
go: finding module for package google.golang.org/grpc/metadata
go: finding module for package google.golang.org/grpc/status
go: finding module for package go.opencensus.io/trace
go: finding module for package google.golang.org/genproto/googleapis/rpc/code
go: finding module for package github.com/jmespath/go-jmespath
go: finding module for package golang.org/x/sys/execabs
go: finding module for package github.com/kevinburke/ssh_config
go: finding module for package github.com/xanzy/ssh-agent
go: finding module for package golang.org/x/crypto/ssh
go: finding module for package golang.org/x/crypto/ssh/knownhosts
go: finding module for package golang.org/x/net/proxy
go: found github.com/gobwas/glob in github.com/gobwas/glob v0.2.3
go: found github.com/jbenet/go-context/io in github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
go: found github.com/mattn/go-runewidth in github.com/mattn/go-runewidth v0.0.13
go: found github.com/apparentlymart/go-textseg/v13/textseg in github.com/apparentlymart/go-textseg/v13 v13.0.0
go: found golang.org/x/text/unicode/norm in golang.org/x/text v0.3.7
go: found github.com/bgentry/go-netrc/netrc in github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: found github.com/hashicorp/go-cleanhttp in github.com/hashicorp/go-cleanhttp v0.5.2
go: found github.com/hashicorp/go-safetemp in github.com/hashicorp/go-safetemp v1.0.0
go: found github.com/klauspost/compress/zstd in github.com/klauspost/compress v1.15.9
go: found github.com/mitchellh/go-homedir in github.com/mitchellh/go-homedir v1.1.0
go: found github.com/ulikunitz/xz in github.com/ulikunitz/xz v0.5.10
go: found golang.org/x/oauth2 in golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094
go: found google.golang.org/api/iterator in google.golang.org/api v0.94.0
go: found google.golang.org/api/option in google.golang.org/api v0.94.0
go: found github.com/ProtonMail/go-crypto/openpgp in github.com/ProtonMail/go-crypto v0.0.0-20220822140716-1678d6eb0cbe
go: found github.com/go-git/go-billy/v5 in github.com/go-git/go-billy/v5 v5.3.1
go: found github.com/go-git/go-billy/v5/osfs in github.com/go-git/go-billy/v5 v5.3.1
go: found github.com/go-git/go-billy/v5/util in github.com/go-git/go-billy/v5 v5.3.1
go: found github.com/imdario/mergo in github.com/imdario/mergo v0.3.13
go: found github.com/sergi/go-diff/diffmatchpatch in github.com/sergi/go-diff v1.2.0
go: found github.com/google/go-cmp/cmp in github.com/google/go-cmp v0.5.8
go: found github.com/googleapis/gax-go/v2 in github.com/googleapis/gax-go/v2 v2.5.1
go: found google.golang.org/api/googleapi in google.golang.org/api v0.94.0
go: found google.golang.org/api/storage/v1 in google.golang.org/api v0.94.0
go: found google.golang.org/api/transport/http in google.golang.org/api v0.94.0
go: found google.golang.org/genproto/googleapis/iam/v1 in google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc
go: found google.golang.org/genproto/googleapis/type/expr in google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc
go: found golang.org/x/net/idna in golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c
go: found github.com/emirpasic/gods/trees/binaryheap in github.com/emirpasic/gods v1.18.1
go: found github.com/go-git/gcfg in github.com/go-git/gcfg v1.5.0
go: found google.golang.org/grpc in google.golang.org/grpc v1.49.0
go: found google.golang.org/grpc/codes in google.golang.org/grpc v1.49.0
go: found google.golang.org/grpc/metadata in google.golang.org/grpc v1.49.0
go: found google.golang.org/grpc/status in google.golang.org/grpc v1.49.0
go: found go.opencensus.io/trace in go.opencensus.io v0.23.0
go: found google.golang.org/genproto/googleapis/rpc/code in google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc
go: found github.com/jmespath/go-jmespath in github.com/jmespath/go-jmespath v0.4.0
go: found golang.org/x/sys/execabs in golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24
go: found github.com/kevinburke/ssh_config in github.com/kevinburke/ssh_config v1.2.0
go: found github.com/xanzy/ssh-agent in github.com/xanzy/ssh-agent v0.3.2
go: found golang.org/x/crypto/ssh in golang.org/x/crypto v0.0.0-20220817201139-bc19a97f63c8
go: found golang.org/x/crypto/ssh/knownhosts in golang.org/x/crypto v0.0.0-20220817201139-bc19a97f63c8
go: found golang.org/x/net/proxy in golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c
go: finding module for package gopkg.in/warnings.v0
go: found gopkg.in/warnings.v0 in gopkg.in/warnings.v0 v0.1.2
# cloud.google.com/go/storage
go/pkg/mod/cloud.google.com/go/[email protected]/bucket.go:1504:30: cannot use r.Condition.AgeInDays (variable of type int64) as type *int64 in struct literal
go/pkg/mod/cloud.google.com/go/[email protected]/bucket.go:1592:30: cannot use rr.Condition.Age (variable of type *int64) as type int64 in struct literal

Any idea how to solve problem?

Clean up CI/release process

The release process is messy & should be replaced with pure gh Actions instead of the current Makefile DIY thing.

Terraform 0.13-0.15 & 1.0

Hi! I'm curious what kind of work it would require to add support for newer versions of terraform.

This appears related to #55

Json outupt - SyntaxError: JSON.parse

Json outupt cannot be parsed and consumed by other tools as json is not valid:

{
  "path": "examples/main.tf",
  "name": "consul",
  "constraint": "> 0.1.0",
  "constraintUpdate": true,
  "latestMatching": "0.7.7",
  "latestOverall": "0.7.7"
}
{
  "path": "examples/0.12.x.tf",
  "name": "consul_aws",
  "constraint": ">=0.5.0,<=1.0.0",
  "constraintUpdate": true,
  "latestMatching": "0.7.7",
  "latestOverall": "0.7.7"
}
{
  "path": "examples/main.tf",
  "name": "consul_github_https",
  "constraint": "0.7.3",
  "latestMatching": "0.7.3",
  "latestOverall": "0.7.7",
  "nonMatchingUpdate": true
}

it should looks like this:

[{
  "path": "examples/main.tf",
  "name": "consul",
  "constraint": "> 0.1.0",
  "constraintUpdate": true,
  "latestMatching": "0.7.7",
  "latestOverall": "0.7.7"
},
{
  "path": "examples/0.12.x.tf",
  "name": "consul_aws",
  "constraint": ">=0.5.0,<=1.0.0",
  "constraintUpdate": true,
  "latestMatching": "0.7.7",
  "latestOverall": "0.7.7"
},
{
  "path": "examples/main.tf",
  "name": "consul_github_https",
  "constraint": "0.7.3",
  "latestMatching": "0.7.3",
  "latestOverall": "0.7.7",
  "nonMatchingUpdate": true
}]

Exit code when one of the module require update

It would be very handy to have dedicated parameter like --exit-code which will return error codef rom terraform-module-versions when one of the module require update. This can be used together with ci pipeline.

Terragrunt files

It could be interesting to include terragrunt.hcl files to the version check. Terragrunt files have the following terraform configuration block (this is an example):

terraform {
source = "[email protected]:terraform-aws-modules/terraform-aws-iam.git//modules/iam-assumable-roles?ref=v2.21.0"
}

Do you know how this could be implemented?

Executable is compatible only with alpine

Executable is compatible only with alpine (musl). When you run this on ubuntu it will not work:

terraform-module-versions
bash: terraform-module-versions: No such file or director

The problem is related to dynamic linking:

ldd /usr/bin/terraform-module-versions
	linux-vdso.so.1 (0x00007ffc517bc000)
	libc.musl-x86_64.so.1 => not found

We should switch to static linking similar to what terraform does:

ldd /usr/bin/terraform
	not a dynamic executable

Difficult to understand changes per version

Some of the version releases have very little information in them. It would be nice to show detailed information on what has changed.

It may be easier to keep a CHANGELOG.md in the root of the repository

Print addditional information

Print addditional information:

  • module source
  • module path

The reason is to quickly Identify which exactly module require update as we can have (like in my case) local modules which includes other remote modules.

@sgreben, @jack17529 what do you think about such change?

Support 'v' prefix

I know it's v' prefix is not fallowing semantic version specification but it's very common approach (and what we are having as well) to add it before version.

I know that semver library already have originalVPrefix() so might we can add support for 'v' prefix.

Currently is working but the output is misleading as chef module is released as a v1.1.0 not 1.1.0:

| UPDATE? |     NAME      | CONSTRAINT | VERSION | LATEST MATCHING | LATEST |
|---------|---------------|------------|---------|-----------------|--------|
| Y       | chef_2019     |            | v1.0.0  | 1.1.0           | 1.1.0  |
| Y       | chef_2016     |            | v1.0.0  | 1.1.0           | 1.1.0  |

Ideally output should looks like this:

| UPDATE? |     NAME      | CONSTRAINT | VERSION | LATEST MATCHING | LATEST |
|---------|---------------|------------|---------|-----------------|--------|
| Y       | chef_2019     |            | v1.0.0  | v1.1.0          | v1.1.0 |
| Y       | chef_2016     |            | v1.0.0  | v1.1.0          | v1.1.0 |

Building binary for Darwin ARM

Hello there !

Thanks for this nice tool, I needed such a tool for module version management and it's perfect. I even managed to make it work with JFrog private registry by specifying the Authorization header.
But I am working with a macbook with M1 chip and had to build it myself, could it be possible to release a binary for arm architecture ?

Thanks !

Show module sources

It would be nice to show not only the module name but also the module source

✗ terraform-module-versions check -pre-release=false .

UPDATE? NAME SOURCE CONSTRAINT VERSION LATEST MATCHING LATEST
(Y) vpc cloudposse/vpc/aws 0.28.1 0.28.1 1.1.0

Cannot hide Github pre-releases

My terraform

module "ecs_alb_service_task" {
  source  = "cloudposse/ecs-alb-service-task/aws"
  version = "0.56.0"
}

This shows pre-release for some reason

✗ terraform-module-versions check -pre-release=false .
| UPDATE? |         NAME         | CONSTRAINT | VERSION | LATEST MATCHING | LATEST |
|---------|----------------------|------------|---------|-----------------|--------|
| (Y)     | ecs_alb_service_task | 0.56.0     | 0.56.0  |                 | 0.58.0 |

https://github.com/cloudposse/terraform-aws-ecs-alb-service-task/releases

Support for monorepos

Terraform Cloud supports the use of monorepos with multiple workspaces. It would be nice if the tool can recursively scan a monorepo and yield per workspace and also an accumulated report for all workspaces.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • golang 1.13.11-alpine3.10
gomod
go.mod
  • go 1.19
  • github.com/Masterminds/semver/v3 v3.2.1
  • github.com/go-git/go-git/v5 v5.4.2
  • github.com/hashicorp/go-getter v1.6.2
  • github.com/hashicorp/terraform-config-inspect v0.0.0-20211115214459-90acf1ca460f@90acf1ca460f
  • github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734@f050f53b9734
  • github.com/jstemmer/go-junit-report v0.9.1
  • github.com/olekukonko/tablewriter v0.0.5
  • github.com/peterbourgon/ff/v3 v3.3.1
  • github.com/sgreben/flagvar v1.10.1
npm
package.json

  • Check this box to trigger a request for Renovate to run again on this repository

Missing artifacts for v3.1.14

Releases v3.1.13 and earlier included binary artifacts. No binary artifacts were published for v3.1.14. Please either publish the artifacts or let us know why you are not publishing artifacts anymore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.