-
Notifications
You must be signed in to change notification settings - Fork 59
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
Feature request: ability to skip plan on (e.g. force) migrations #53
Comments
@dominics Thank you for your proposal! For 2, I feel skipping a plan phase is unsafe. If you don't need a plan, why don't you use just For 1, asynchronous feedback for terraform command sounds great, but I can image that it requires redesigning internal implementations and it would be a non-trivial work. If you really need it, please split it into a new issue so that we can track it separately. P.S. A tip for speeding up a refresh phase on terraform plan: |
We still get a lot of mileage out of:
Yes, this would be a nice improvement
I'll open another issue if it continues to be an annoyance - it's fine for now, and I don't really need it. I guess the only thing I'd ask is: might it be possible to output the debug message about the command that's being run before that command is finished running (not all the output, just the command being exec'd?) - that would have been sufficient to reassure me that the "pause" I was observing was expected/normal/plan time (
Thanks for the prompt to retry -parallelism in my environment (we had it tuned down due to provider bugs) - |
Derived from: #53 (comment) If teraform plan takes a long time, it looks like tfmigrate plan is hanging. To help understand what's happening, log a command string before executing it.
It sounds a reasonable improvement. I've fixed it in #55.
OK. Although I can't start working on this feature right away, I'll plan to extend internal architecture so that multiple migrations can be applied in a single transaction. |
Please. this is something that we also need on my team, as we have resources in multiple states in azure storage backends that we need to put into a single state on terraform cloud. this backends are separated by: resource group, subnet, aks cluster, kubernetes resources in different root modules/folders. |
I am hesitant to implement the ability to skip the plan phase as originally proposed, but grouping multiple migrations into a single transaction is worth considering. Even though I can't start working on this feature right away, please separate this as a new feature request if necessarily. Thanks! |
Thanks for the very useful tool.
Background
I'm using the
force
option in most of my migrations, because while I appreciate the safety of planning and looking for no changes, I find I often want to break up my migration files, and end up applying more than one for the same TF code change (i.e. the TF code has changes A, B, C, and there are three migration files that correspond; if tfmigrate goes to plan before all have happened it'll show "expected" diff changes).Another piece of context: I have a Terraform configuration that can take three minutes to perform
terraform plan
(it's quite slow 😢 ), even withTF_CLI_ARGS_plan="-target=module.blah.module.blah"
to try to speed it up (🤔 I guess I should tryTF_CLI_ARGS_plan="-refresh=false"
too while I'm at it - most of the plan time is state refresh time.)Request
[INFO] [migrator@.] check diffs
, even though it's busy running plan in the background), and tfmigrate doesn't output whatterraform plan
commands it is running.force = true
) - and this happens for each migration (so if I'm splitting a migration into 3 logical "parts", to apply all 3 will cost me 3 times theterraform plan
time)Workaround
In the meantime, I figure I can make an exec wrapper that just exits when asked to plan, and use it with
TFMIGRATE_EXEC_PATH
- so I'm not completely blocked or anythingThe text was updated successfully, but these errors were encountered: