-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow VM folder to pre-exist #44
Comments
@petervansickel, what is the use case for this? Apparently, there is no easy way to implement an if-then-else statement in terraform to handle the situation where the folder your VMs will go into already exists prior to your first terraform apply. We can either create a folder (for which we must ensure that folder does not exist) or import a folder (for which we must ensure the folder already exist) before you execute terraform apply... In fact, it might be a better practice to error out when a folder already exists so that you avoid team mates (or even worse, people you that does not have anything to do with you project wise) deploying stuff into your folder in case permissions in the vCenter are a bit too loose... What are your thoughts around this? |
Seems like this is a design decision by the vsphere guys: hashicorp/terraform-provider-vsphere#219 |
The use case arose out of the folder structure we're using in the CSP lab. |
I think that's probably a perfect use case for importing the folder:
In this case the folder would of course be deleted again with a |
the command didn't work for me. with terrform 0.13.6. I don't understand. I destroyed the cluster and the folder was deleted and again removed the tfstate file and hidden terraform folders. Now I init +plan & apply the folder creates in this apply portion but fails indicating folder exists ?? |
Per Peter Van Sickel,
At the moment, terraform for VMware will error out if the folder where VM will be place under already exists.
This enhancement should handle this situation.
The text was updated successfully, but these errors were encountered: