Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terragrunt graph does not work properly with --terragrunt-working-dir #3191

Open
lmaraite-devk opened this issue Jun 11, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working terragrunt

Comments

@lmaraite-devk
Copy link

Describe the bug

Running terragrunt graph ... --terragrunt-working-dir=... does validate the whole graph, but does not evaluate & print the stack order and does not execute the given terragrunt command on the stack.

Steps To Reproduce

Execute terragrunt graph validate --terragrunt-working-dir=... on the top level of your infrastructure repository.
An minimal example with the exact steps to reproduce can be found here: https://github.com/lmaraite-devk/terragrunt-graph-issues .

Expected behavior

I would expect the same output as if I would navigate into the directory with cd and executing terragrunt graph there

Nice to haves

cd + terragrunt graph:

➜  terragrunt-graph-issues git:(main) ✗ cd live/accounts/dev/eu-central-1/level-0
➜  level-0 git:(main) ✗ terragrunt graph validate
INFO[0000] The stack at /home/lmaraite/go/src/github.com/lmaraite-devk/terragrunt-graph-issues will be processed in the following order for command validate:
Group 1
- Module /home/lmaraite/go/src/github.com/lmaraite-devk/terragrunt-graph-issues/live/accounts/dev/eu-central-1/level-0

Group 2
- Module /home/lmaraite/go/src/github.com/lmaraite-devk/terragrunt-graph-issues/live/accounts/dev/eu-central-1/level-1

Success! The configuration is valid.

INFO[0000] Downloading Terraform configurations from file:///home/lmaraite/go/src/github.com/lmaraite-devk/terragrunt-graph-issues/modules/echo into /home/lmaraite/go/src/github.com/lmaraite-devk/terragrunt-graph-issues/live/accounts/dev/eu-central-1/level-0/.terragrunt-cache/OSF6hh3PRkeoHK90cE-WwNpox9Y/LUMgVQAUKRtrfn_pNJw4s5CQ8G0  prefix=[/home/lmaraite/go/src/github.com/lmaraite-devk/terragrunt-graph-issues/live/accounts/dev/eu-central-1/level-1]
Success! The configuration is valid.

terragrunt graph --working-dir=...:

➜  terragrunt-graph-issues git:(main) ✗ terragrunt graph validate --terragrunt-working-dir live/accounts/dev/eu-central-1/level-1
INFO[0000] The stack at /home/lmaraite/go/src/github.com/lmaraite-devk/terragrunt-graph-issues will be processed in the following order for command validate:

Versions

  • Terragrunt version: v0.58.15

Additional context

@lmaraite-devk lmaraite-devk added the bug Something isn't working label Jun 11, 2024
@denis256 denis256 self-assigned this Jun 11, 2024
@ZachGoldberg ZachGoldberg added the terragrunt label Jun 11, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working terragrunt
Projects
None yet
Development

No branches or pull requests

3 participants