Supplying the --terragrunt-tfpath= argument to terragrunt breaks terraform. The variable is passed down to the terraform spawn, and then terraform fails due to invalid arguments.
example:
./terragrunt_darwin_amd64 plan-all --terragrunt-tfpath=
pwd/terraform
[terragrunt] [/Users/jcharette/vbustash/ox/tf_live/dev/alb] 2017/08/16 07:28:39 Running command: terraform plan -var-file=/Users/jcharette/vbustash/ox/tf_live/dev/alb/terraform.tfvars --terragrunt-tfpath=/Users/jcharette/vbustash/ox/tf_live/dev/terraform
[terragrunt] [/Users/jcharette/vbustash/ox/tf_live/dev/alb] 2017/08/16 07:28:39 Module /Users/jcharette/vbustash/ox/tf_live/dev/alb has finished with an error: exit status 1
Running the same plan without the --terragrunt-tfpath argument succeeds with no errors.
Sounds like a bug! Teragrunt args should be filtered out here:
https://github.com/gruntwork-io/terragrunt/blob/master/cli/args.go#L138
Perhaps something broke with that code. PRs are welcome!
I am running into the same issue. If I use --terragrunt-tfpath=xxx before plan, I get
Incorrect Usage. flag provided but not defined: -terragrunt-tfpath
But, if I pass 'path' _before_ the terragrunt flag, it gets passed to the terraform command.
Don't know if it's related but Yori asked me to log it. Basically Trying using --terragrunt-tfpath seems to fail while using TERRAGRUNT_PATH, things work better. He said "hat definitely looks like a bug. Specifically, it looks like we forgot to mark terragrunt-tfpath as a terragrunt specific arg. Can you file an issue in the Github repo (https://github.com/gruntwork-io/terragrunt)? In the meantime, can you try using the environment variable TERRAGRUNT_TFPATH (and setting it to /usr/local/bin/tfpath/0.11.7/terraform) as a workaround? (edited) "
Updating this issue, the flag --terragrunt-tfpath is passed down to terraform and still breaking, only works with the TERRAGRUNT_TFPATH env variable, tested on v0.19.8
The bug appeared today for me as well. Setting the environmental variable TERRAGRUNT_TFPATH worked. Thanks @xyklex
While this particular bug still exists, there is a new workaround now: you can set the terraform_binary attribute to control from terragrunt.hcl as well (https://github.com/gruntwork-io/terragrunt#terraform_binary)
same issue for me
Most helpful comment
Updating this issue, the flag
--terragrunt-tfpathis passed down to terraform and still breaking, only works with theTERRAGRUNT_TFPATHenv variable, tested on v0.19.8