terragrunt: Getting "Error with plan:" for (nearly) all modules

I have a tree of 89 terragrunt configurations, ie. (terraform.tfvars) files and I’m seeing terragrunt report errors like this for 86/89 of them:

[terragrunt] 2017/12/18 10:31:25 Error with plan: [terragrunt] [/path/to/config/main-account/us-west-2/stages/qa/oauth/eb_env_worker] 2017/12/18 10:30:14 Initializing remote state for the s3 backend

I suspect this is actually two separate lines of output, ie. the two strings that start with [terragrunt]. The first instance comes from line 65 of configstack/stack.go.

I’d do some debugging, etc. but I can’t figure out how to build terragrunt locally? (I’ll raise another ticket for that).

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 9
  • Comments: 23 (6 by maintainers)

Most upvoted comments

Seeing the same issue:

$ terragrunt --version; terraform --version
terragrunt version v0.21.10
Terraform v0.12.16

Directory names altered for modesty:

$ cd /home/<userid>/<tf-workdir>
$ terragrunt plan-all

Line numbers added below to the console output for reference. Note line (4): Error with plan:. This log item is written on any *-all commands, it seems, despite the invocation succeeding:

...(snipped)...
1) Releasing state lock. This may take a few moments...
2) [terragrunt] [/home/<userid>/<tf-workdir>/<myapp1>] 2020/01/27 10:16:37 Module /home/<userid>/<tf-workdir>/<myapp1> has finished successfully!
3) [terragrunt] [/home/<userid>/<tf-workdir>/<myapp2>] 2020/01/27 10:16:37 Module /home/<userid>/<tf-workdir>/<myapp2> has finished successfully!
4) [terragrunt] 2020/01/27 10:16:37 Error with plan: [terragrunt] [/home/<userid>/<tf-workdir>] 2020/01/27 10:16:20 Running command: terraform --version
5) [terragrunt] [/home/<userid>/<tf-workdir>] 2020/01/27 10:16:20 Initializing remote state for the s3 backend
...(snipped)...

If I execute the singular version of a command (ex: plan, apply, etc.) against any particular child module (say, for <mayapp1> or <myapp2>), those invocations complete successfully as well without the Error with plan: log item.

Another observation is that line (4) seems to have two log entries. The Error with plan log item does not end with a newline – there is another log item (Running command: terraform --version in this case) immediately following. Just struck me as curious.

@alexkayabula’s PR in #1229 was released in https://github.com/gruntwork-io/terragrunt/releases/tag/v0.23.28. That hopefully fixes this issue. Try it out and let us know!

@robinbowes @kaka-ruto @tokiwong @lukasz-kaniowski @JoshuaSeidel , I presume this PR should have resolved this issue.

@kaka-ruto I tried this already and never got this error.

@ahmad-hamade , try running each module singly. You might get a more descriptive error that can be easy to fix. Did it this way and it helped.

I am seeing this as well. Can this get looked at. looks like a issue from 2017. its 2020…