hashicorp / terraform-config-inspect

A helper library for shallow inspection of Terraform configurations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to install

ryanking opened this issue · comments

Maybe I am doing something wrong, but the instructions from the README do not work for installing this library.

 $ go get github.com/hashicorp/terraform-config-inspect
cannot find package "github.com/hashicorp/hcl/v2" in any of:
	/usr/local/Cellar/go/1.15.2/libexec/src/github.com/hashicorp/hcl/v2 (from $GOROOT)
	/Users/rking/go/src/github.com/hashicorp/hcl/v2 (from $GOPATH)
cannot find package "github.com/hashicorp/hcl/v2/gohcl" in any of:
	/usr/local/Cellar/go/1.15.2/libexec/src/github.com/hashicorp/hcl/v2/gohcl (from $GOROOT)
	/Users/rking/go/src/github.com/hashicorp/hcl/v2/gohcl (from $GOPATH)
cannot find package "github.com/hashicorp/hcl/v2/hclparse" in any of:
	/usr/local/Cellar/go/1.15.2/libexec/src/github.com/hashicorp/hcl/v2/hclparse (from $GOROOT)
	/Users/rking/go/src/github.com/hashicorp/hcl/v2/hclparse (from $GOPATH)
cannot find package "github.com/hashicorp/hcl/v2/hclsyntax" in any of:
	/usr/local/Cellar/go/1.15.2/libexec/src/github.com/hashicorp/hcl/v2/hclsyntax (from $GOROOT)
	/Users/rking/go/src/github.com/hashicorp/hcl/v2/hclsyntax (from $GOPATH)
commented

Maybe you're using Go in GOPATH mode.
Can you try to :

  1. export GO111MODULE="on"
  2. go get github.com/hashicorp/terraform-config-inspect

Hi,
I had the same issue on Windows and this solved the problemfor me:

set GO111MODULE=on
go get github.com/hashicorp/terraform-config-inspect

But for sure I will appreciate having pre-built binaries too.