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

[BUG] terramate plan file output not working with terragrunt dependencies #1997

Open
FabianDohmen opened this issue Dec 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@FabianDohmen
Copy link

Describe the bug
Setup: you have two terragrunt modules C and D, where D depends on C. The dependency is marked via wants block. A change in the module C affects its output, which requires D to run, which uses said output. If you run terramate run --changed terragrunt plan -out plan the plan files for both will be created. However the plan file in terragrunt module D does not contain the changes from the terragrunt plan of module C.

To Reproduce

Steps to reproduce the behavior:

  1. Scenariao has been described above.

Expected behavior
terramate should transfer the plan output from module C such that the plan of module D does contain the required changes.

@FabianDohmen FabianDohmen added the bug Something isn't working label Dec 9, 2024
@i4ki
Copy link
Contributor

i4ki commented Dec 10, 2024

Hi @FabianDohmen

The Terraform plan computes the planned changes based on current stack code and its state, but as you did not apply the changes in C then Terraform cannot plan its change.
If you apply C, then D will pick up the output changes in its plan, as expected.

Does Terragrunt alone shows the correct plan if you do terragrunt run-all plan ?

@FabianDohmen
Copy link
Author

You can atleast carry it over via mocked output values. But the core problem here is that the workflow orchestration loses one of the main protective features. I want to write out the plan to a file, review the plan and then apply that plan and nothing that changed between creating the plan and applying. If the plan does not carry over the values to dependencies, then the plan files can not be written properly and therefore its borderline useless in a cicd setting with multiple contributors. The entrie point of the cicd workflow automation is to update the changed module and all the dependent modules in one go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants