rant: run --all and stack features are unusable in CI environments
#4588
Replies: 2 comments 11 replies
-
|
Yes, the Gruntwork Pipelines product does have native support for Terragrunt Stacks: Unfortunately, the way that OpenTofu and Terraform currently work, there is no way to signal to OpenTofu that some variables are unknown, and might need to be recalculated, even when a plan is saved. I've documented a workaround here in the past. We also champion this issue to support this behavior natively in OpenTofu better. The OpenTofu engineer working on behalf of Gruntwork, @diofeher, has done some good work exploring this problem space, and might have an RFC to address it in OpenTofu in the near future. |
Beta Was this translation helpful? Give feedback.
-
|
Hello there. I have a case that could be related to this discussion. If it's not the case (e.g. if an issue should be opened instead), just let me know and I'll amend. We are observing a strange behaviour with terragrunt 0.89.4 and runner pools, where everything works fine when using E.g. say that I have a stack in the directory If I run The same will fail in Atlantis, where the runner pool won't find any units in unless I add these to the workflow: - env:
# Preserve the usual behaviour when running commands like `terragrunt run --all plan`, when
# we want it do descend in all units below the current one.
# See https://terragrunt.gruntwork.io/docs/reference/cli/commands/run#queue-include-dir
name: TG_QUEUE_INCLUDE_DIR
value: "**"
- env:
# ditto
name: TG_STRICT_CONTROL
value: "double-star"I can't really understand what it is that makes those variables needed in Atlantis, while everything works just fine. Unsure if it's another case for usability of terragrunt in CI/CD or something else, so trying with this discussion first. Cheers, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am aware this is a long standing issue of terragrunt and CI enviroments (like Atlantis). Issue of not being able to apply with plan file units containing inter-dependencies. Without
run --allat least units can be slowly applied one by one (which is also a pain, but at least it works, one commit per unit). Testing out stacks just now I was hopeful that it has solved the CI issues. Sadly it is still exactly the same story as withrun --all.Key problem:
In CI environments like Atlantis, teams need deterministic plan files with correct outputs for each inter-dependency. Having mock outputs getting applied once and then re-running the apply seems like a clunky hack. Running applies without plan files is also dangerous.
What I am trying to understand, and perhaps this helps some other developers' sanity, are two things:
run --allandstackcommands/infrastructures really intended to be always run manually? It is hard to believe so I am open to learn some key aspects that I might be missing. Perhaps gruntworks' internal pipeline platform has this solved and is a paid offering?stackfeature?Beta Was this translation helpful? Give feedback.
All reactions