-
-
Notifications
You must be signed in to change notification settings - Fork 970
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 apply-all specific plan fails #1271
Comments
this bug is also mentioned on issue #848 however that ticket is closed and there doesn't seem to be any fix or workaround in sight. |
there's also a good suggestion here: #454 (comment) |
This is actually not recommended to do, and in fact, is impossible due to terraform limitations (you can't have a plan that spans multiple state files). See #1127 (comment) for additional commentary on the |
For As far as fixing the specific error with the forced args, we could certainly get that fixed, but it doesn't resolve the fundamental issue with using reviewed plans on |
Hello, It's not anti-pattern. I am not suggesting to use one single plan to apply. terraform {
before_hook "generate_plan_path" {
commands = ["plan"]
execute = ["mkdir", "-p", "${get_parent_terragrunt_dir()}/plans/${path_relative_to_include()}"]
}
extra_arguments "plan_args" {
commands = [
"plan"
]
arguments = [
"-out",
"${get_parent_terragrunt_dir()}/plans/${path_relative_to_include()}/tf.p"
]
}
extra_arguments "apply_args" {
commands = [
"apply"
]
arguments = [
"${get_parent_terragrunt_dir()}/plans/${path_relative_to_include()}/tf.p",
]
}
} |
To clarify, we (Gruntwork) consider it an antipattern to use All I was trying to say is that there is much more than just having the single module plan files work with In any case, as mentioned above, a PR to fix this particular issue with injected args is certainly welcome. I think this could be fixed by updating the logic in this function to look for positional args in |
@yorinasub17 I think i understand what you mean now. It was a bit confusing. So |
Yup this is basically correct. |
Just bumping this one. I'm currently trying to make a CI pipeline using terragrunt and I'm running into this as well. The workflow I had in mind was:
Currently this isn't possible because specifying a plan with |
This is not a new issue, and I can't believe it wasn't fixed so far.
Running
terragrunt apply-all
blindly is the perfect recipe for disaster.In order to make this more acceptable for automation, we should at least allow for a reviewed plan to be applied.
The issue resides with forced silent arguments
-input=false
and-auto-approve
.These arguments are added after any
extra_arguments
, which generates invalid terraform commandAt least allow us to override your forced arguments.
The text was updated successfully, but these errors were encountered: