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

Please advise on upgrade path #457

Closed
skywalk7 opened this issue Apr 6, 2018 · 3 comments
Closed

Please advise on upgrade path #457

skywalk7 opened this issue Apr 6, 2018 · 3 comments
Labels
enhancement Type: Enhancement

Comments

@skywalk7
Copy link

skywalk7 commented Apr 6, 2018

So we have couple hundred VMs already deployed with provider version 0.4.3.
Now I'm trying to update code and modules to support 1.3 and I'm running into issues:

  1. linux_options and windows_options are mutually exclusive in clone block and it breaks one to one match from old resources to new ones.
  2. When I try to rewrite resource configuration it complains about clone block:
    *terraform.EvalDiff, err: this resource was imported or migrated from a previous version and does not support cloning. Please remove the "clone" block from its configuration. Also it makes import support unusable.
    Can you please help me to understand how I can upgrade to the newer version of provider without completely redeploying everything.
@catsby catsby added the bug Type: Bug label Apr 6, 2018
@vancluever vancluever added question and removed bug Type: Bug labels Apr 6, 2018
@vancluever
Copy link
Contributor

@skywalk7, the resource was changed a lot in 1.0 to try 1) ensure the configuration was a lot more explicit and matched the API of vSphere a lot closer, and 2) steps were taken to minimize the risk of data loss or accidental deletion when migrating from older versions, namely surrounding the use of cloned virtual machines.

This means a couple of things for your situation:

  1. If you were deploying both Linux and Windows VMs with the same configuration settings pre-1.0, you will have to break these configurations up. As you mentioned these two settings are now mutually exclusive and you cannot use Linux settings with a Windows template, or vice versa, nor can you specify both at the same time.

  2. Unfortunately, we do not support migrating a pre-1.0 state to a configuration that makes use of VM cloning. This is because the presence of the clone sub-resource block, which was introduced in 1.0, forces a new resource. This restriction may be lifted in the future, but for now, the best path for you is to import and upgrade VMs to a configuration that does not use cloning, using a new supported configuration going forward.

I apologize for any inconvenience that this may cause you, and again we have definitely been considering ways to address the second issue specifically, but as the resource required very drastic changes to get it to where it is today, some decisions had to be made about legacy support.

I'm going to close this now, but I would definitely follow the repo for updates regarding legacy migrations and imports.

Thanks!

@vancluever vancluever added the enhancement Type: Enhancement label Apr 6, 2018
@vancluever
Copy link
Contributor

Hey @skywalk7 I want to take a stab at this (as your question got me thinking)!

If you have not started on any refactoring based on the above info (other than OS configuration breakup), maybe hold off a few days. I'll have an answer on whether or not it's going to be possible for us to change answer 2 anytime soon (including a bit more detail as to why it would not be if it is not easily technically possible).

Thanks!

@vancluever
Copy link
Contributor

@skywalk7 1.4.0 is now out with the new updates to import/upgrade capabilities. Give it a go and let us know if you have any issues!

@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants