Skip to content
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

Closed
eirslett opened this issue Oct 12, 2015 · 5 comments
Closed

Reset resource without destroying/recreating #59

eirslett opened this issue Oct 12, 2015 · 5 comments
Labels
enhancement New feature or request

Comments

@eirslett
Copy link

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)

@phinze
Copy link
Contributor

phinze commented Oct 12, 2015

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?

@eirslett
Copy link
Author

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)

@afeld
Copy link

afeld commented Nov 19, 2017

taint is probably the best existing way to do this.

@hashibot hashibot transferred this issue from hashicorp/terraform Sep 26, 2019
@hashibot hashibot added the enhancement New feature or request label Oct 2, 2019
@paultyng
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Dec 26, 2019

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.

@ghost ghost locked and limited conversation to collaborators Dec 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants