-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Feature Request: Support importing vsphere_virtual_machine resources #9535
Comments
Any update on this? vSphere is a major platform that we provision infrastructure for using TF (and it's still no. 1 in the enterprise), but often are faced with the need to "import" existing infrastructure. We would be happy to contribute this functionality, but don't completely understand the import functionality as it's not well-documented and only a few supported platforms to compare to. |
+1 |
+1 |
Based on the error in the OP the issue was that the provider was not configured properly. It is necessary to have the following configured in your environment:
I have mine in a general configuration.tf file where I have a bunch of static information defined for the environment. In addition, you can find the exact syntax for how to designate the VM to import here towards the bottom under the Import section header. Specifically, the command will look like:
I am successfully executing this with the following versions of Terraform and the vSphere provider: |
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. |
Terraform Version
Terraform v0.7.7
Affected Resource(s)
Expected Behavior
The following command would successfully import the resource into the tfstate file.
Actual Behavior
The command above fails with:
The text was updated successfully, but these errors were encountered: