Develop terragrunt

OS: macOS High Sierra
go version go1.9.2 darwin/amd64
glide version 0.13.1


Hi, I’m trying to boostrap a PR but face some issues with my setup :


build steps:

  • fork the project on github
  • clone forked project
  • create feature branch
  • glide install
warning: `The name listed in the config file (github.com/gruntwork-io/terragrunt) does not match the current location (.)`
  • go run main.go plan
main.go:4:2: cannot find package "github.com/gruntwork-io/terragrunt/cli" in any of:
	/usr/local/Cellar/go/1.9.2/libexec/src/github.com/gruntwork-io/terragrunt/cli (from $GOROOT)
	/Users/ebarault/go/src/github.com/gruntwork-io/terragrunt/cli (from $GOPATH)
...
...

You can safely ignore the warning from Glide.

Did you check out the code in your GOPATH?

these terragrunt dependancies are indeed missing in my go home, how should install them? building them fails for the same reasons.

github.com/gruntwork-io/terragrunt/cli
github.com/gruntwork-io/terragrunt/errors
github.com/gruntwork-io/terragrunt/shell
github.com/gruntwork-io/terragrunt/util

These are all part of the Terragrunt repo itself. Go is very obnoxious about the GOPATH, so you need to clone the Terragrunt repo into the proper folder on your GOPATH and all of those should be found automatically. For example, if your GOPATH is at ~/go, then you would clone Terragrunt into ~/go/src/github.com/gruntwork-io/terragrunt/.

ok… i had just figured in the meantime i needed to put the terragrunt src inside my $GOPATH/src dir… too bad it cannot be automated
thx

Yea, having to bend how you manage source code to Go’s GOPATH is frustrating.