-
Notifications
You must be signed in to change notification settings - Fork 232
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
Reset resource without destroying/recreating #59
Comments
Hi @eirslett - interesting idea! At base, Terraform is just a driver for upstream API calls - so in order to model a feature like this we'd need to be able to express it as a sequence of operations. I'm not aware of the equivalent API actions that would yield the sort of behavior you're talking about. Can you share an example? |
DigitalOcean has "Rebuild From Image" and "Rebuild from original" buttons, I'm sure they have an API for it as well, but I haven't checked too closely. SoftLayer has restore from image, and I'm pretty sure OpenStack has it as well. (Ok, so it's mostly guesswork, I don't have any proof of existence, but it would be reasonable) |
|
In order to accomplish this you would still need something that "changed" in Terraform (ie. a throwaway version or something that caused this to invoke the upstream API), but as mentioned above, its not something that easily fits in to the Terraform model. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Many providers have support for "restore from factory-settings"-like functionality, e.g. you can revert a machine state to a droplet image or ISO file, without destroying the resource itself. This could be useful to expose through Terraform (
terraform reset my-server
?) since in immutable infrastructure, you might want to reset a resource, but not lose its otherwise ephemeral properties, like its IP address, or the contents of a data disk which is separate from the boot disk.(Not all providers support floating IPs and/or disk mounts separate from the resource itself)
The text was updated successfully, but these errors were encountered: