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

Upgrading to v0.6.16 will delete and rebuild all vSphere hosts #7008

Closed
tmlink opened this issue Jun 3, 2016 · 8 comments
Closed

Upgrading to v0.6.16 will delete and rebuild all vSphere hosts #7008

tmlink opened this issue Jun 3, 2016 · 8 comments

Comments

@tmlink
Copy link

tmlink commented Jun 3, 2016

Upgraded to Terraform v0.6.16 . Changelog mentions:
provider/vsphere: Add skip_customization option to vsphere_virtual_machine resources (#6355)

All of the resources of this vsphere are showing:

 skip_customization:                     "" => "false" (forces new resource)

even explicitly setting skip_customization = "" doesn't help. All of the servers will be delete and rebuild -- data loss.

@tmlink tmlink changed the title Upgrading to terraform to 0.6.16 will delete and rebuild all vSphere hosts Upgrading to v0.6.16 will delete and rebuild all vSphere hosts Jun 3, 2016
@stack72
Copy link
Contributor

stack72 commented Jun 3, 2016

@tmlink have you tried skip_customization = true ?

P.

@tmlink
Copy link
Author

tmlink commented Jun 3, 2016

skip_customization = true leads to:

   skip_customization:                     "" => "true" (forces new resource)

@stack72
Copy link
Contributor

stack72 commented Jun 3, 2016

Hi @tmlink

So this was an oversight and we missed a statemigration. Therefore, in order to unblock you and to stop your infra being destroyed, we need to manually change your state

Can you post the contents of the your TFstate file (minus secrets) for one of your virtual machines and I can help you with the state change

Thanks

Paul

@stack72 stack72 self-assigned this Jun 3, 2016
markpeek added a commit to markpeek/terraform that referenced this issue Jun 5, 2016
Fixes vsphere virtual machine migration issues with
disk controller_type and skip_customization.
@tmlink
Copy link
Author

tmlink commented Jun 6, 2016

I can probably fix my tfstate file, but that's not fixing the problem. It needs to be handled in side of terraform

  1. We have several customers who have built their infrastructures using our modules, they will need remedy. Which will be a pain since they run terraform from multiple platform.

Terraform shouldn't set a var from not-set to setting it on it's own. Binary vars should use not-set or "" to mean, don't change.

@stack72
Copy link
Contributor

stack72 commented Jun 6, 2016

Hi @tmlink

Yes, we will be fixing this on the TF side (there is an open PR for this - #7023). I only suggested fixing your state file to unblock you right now

This migration was missed - going forward, migrations like this will be added by default

Paul

@stack72 stack72 closed this as completed in 57e9357 Jun 7, 2016
@tmlink
Copy link
Author

tmlink commented Jun 7, 2016

Thanks Paul, I can get myself unblocked. I believe that #7023 addresses my concerns.

@jare19
Copy link

jare19 commented Jul 21, 2016

lifecycle { ignore_changes = ["linked_clone", "skip_customization"] }
insert this block into the vsphere_virtual_machine resource block and it will fix the upgrade problem.

@ghost
Copy link

ghost commented Apr 24, 2020

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 Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants