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

Ability to restore VSI from snapshot consistency group #640

Open
karthik0918 opened this issue Mar 21, 2024 · 2 comments
Open

Ability to restore VSI from snapshot consistency group #640

karthik0918 opened this issue Mar 21, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request internal-synced

Comments

@karthik0918
Copy link

Description

A VSI created using terraform, we would like to restore a VSI retaining the primary IP address, VSI tags, VSI name, VSI Hostname.
Restore from a snapshot consistency group snapshot (includes boot and data)
Get the VSI to a previous state by retaining IP address / Network interface, VSI tags, VSI name, VSI Hostname
Needs to be available for customers to consume via a deployable architecture and/or IBM Cloud Schematics

New or affected modules

resource "ibm_is_instance" "vsi" {

By submitting this issue, you agree to follow our Code of Conduct

@in-1911
Copy link

in-1911 commented Apr 3, 2024

We had a similar scenario where a number of VSIs have been deployed via landing zone and we needed to be able to restore a VSI's storage volumes from snapsnots on demand.
After some discussions on the topic, I believe this operation should be done outside of the context of the terraform that provisions the VSIs to begin with.

  • Landing zone usually provisions multiple VSIs using the same configuration element - e.g. across several zones or multiple instances into a zone. When one of them needs to get restored, it's not feasible to "carve" it out of the configuration and specify the source snapshots for its volumes in the original configuration that used to deploy it.
  • Even if there is only one instance in the landing zone configuration, changing the original configuration now ties the environment deployment to a snapshot which will be used from now on for that instance, so the snapshot has to be retained forever.
  • If the restored volumes and the new VSI (you cannot attach a new boot volume to an existing VSI) are created in a different terraform state, now you have the original state that is no longer in sync and a new "parallel" one for the restored instance.

The only option to keep the original terraform configuration and state consistent and not tied to the specific snapshot is to import the new resoruces (VSI, volumes, etc) into the original terraform state after the restore has been done with creating a new VSI. But I think that may be too risky.

@toddgiguere
Copy link
Contributor

@in-1911 can you reach out to me through internal slack? I might have some questions for you as we dive deeper into this, based on your experiences?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal-synced
Projects
None yet
Development

No branches or pull requests

4 participants