terragrunt icon indicating copy to clipboard operation
terragrunt copied to clipboard

No error message when Terraform isn't available

Open marinalimeira opened this issue 2 years ago • 5 comments

When trying to execute any Terragrunt command in a path where Terraform isn't available, I get no error message:

❯ aws-vault exec sbox -- terragrunt apply --terragrunt-log-level debug --terragrunt-debug
DEBU[0000] Did not find any locals block: skipping evaluation.
DEBU[0000] Running command: terraform --version          prefix=[/Users/marina/go/src/github.com/gruntwork.io/testing123]
ERRO[0000] exit status 1

It should report terraform not found.

marinalimeira avatar Aug 03 '22 15:08 marinalimeira

Hi, I was wondering on which environment/Terragrunt version this happened, on my tests in Ubuntu / Terragrunt v0.38.6:

$ terragrunt apply --terragrunt-log-level debug --terragrunt-debug
DEBU[0000] Did not find any locals block: skipping evaluation. 
DEBU[0000] Running command: terraform --version          prefix=[/projects/gruntwork/terragrunt-tests/issue-2223] 
ERRO[0000] exec: "terraform": executable file not found in $PATH 
ERRO[0000] Unable to determine underlying exit code, so Terragrunt will exit with error code 1 

denis256 avatar Aug 03 '22 16:08 denis256

I am on macOS 12.5 and terragrunt v0.38.6.

marinalimeira avatar Aug 04 '22 08:08 marinalimeira

I experienced this today with terragrunt v0.45.8

davidpellcb avatar Aug 04 '23 18:08 davidpellcb

Hi, can be shared more details about the environment:

  • OS version
  • shell type/version
  • if any terraform wrappers are used
  • which is output of execution "terraform --version" in the shell

denis256 avatar Aug 04 '23 19:08 denis256