-
Notifications
You must be signed in to change notification settings - Fork 116
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
Init -migrate-state #355
Comments
Looks like this feature needs approval.
|
Hi @chriskolenko As you already mentioned, this one requires interactive approval, and its nature generally suggests it's something a human would more likely do than an unattended script. I can see the need to do some kind of mass-migration of many workspaces between backends though. Is that the use case you are hoping to satisfy? Have you considered writing a (simpler) one-off shell script for this? |
see #279, it would greatly benefit this library to enable custom arguments to be provided when it's not supported off the shelf by the library. Also migration path from 0.12 to 1.3.7 in automated fashion is nothing simple, especially when trying to migrate over 100 hundred workspace only to keep up in versioning. |
To be completely transparent, one-off migration code written in Go is not a use case we have previously considered for this library, which may explain the lack of many other commands and flags. In the interest of understanding the consumers and future enhancements: Is it just familiarity with the language and/or unfamiliarity with shell?
I agree, but I don't see how one could fully and reliably automate the upgrade in any language, i.e. run it as unattended script? Hence my question about the use case and intentions. We are open to changing the APIs, but we need to understand the use cases and address those more holistically than one command/flag at a time. |
Same reasons you would use go for any other use case.
We also use go for rendering/generating terraform hcl (à la CDK i guess), so it makes sense to use the same language. Can't say about OP use case though. |
@draeron Thank you, this is useful. I still think that scripts cannot be completely reliable even with the use of That said it would probably still make sense to support this use case pragmatically for the simple/happy cases. I am not sure what implications it will have for We'll need to bring this up with Terraform Core maintainers, as it wouldn't make much sense for the CLI to prevent automation by detecting interactive mode and rejecting |
Not sure when -migrate-state was added to Terraform, but in version 1.3.7 it exists.
If a PR was created with adding the extra option would it be accepted? Not sure how to make it forward or backward compatibility.
The text was updated successfully, but these errors were encountered: