-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Cannot use spaces in hostname with vsphere provider since #8075 #8917
Comments
Hi @Anthonie-Smit! I'm not familiar enough with Vsphere to be able to address this immediately, but can you confirm whether you mean the object name as per the body text (in which case this is likely a bug) or the hostname as per the title (in which case spaces are prohibited by RFC1123)? |
Hi @jen20 . I meant the object name for the virtual machine in VMware. We provide new virtual machines with a description in the object name for ease of identification. For example we use an object name like this: ams-app-01 (Application Server) With the previous versions of Terraform this wasn't an issue. However with the changes that I highlighted the object name is being split on a space character, which fails our deployment. Here is a terraform template that works with Terraform v0.6.16 and fails with Terraform v0.7.3: linked_clone = "true"resource_pool = "Cluster/Resources/Acc_nobackup"network_interface { disk { |
This is also an issue if the Datastore name contains spaces. |
I just ran into a similar issue where the datastore had a space in the name. I'm not familiar enough with vsphere to know if the format is always the same, but maybe it should be parsing the datastore out of the |
FYI we are running into this error when using a datastore with a space in the name ( |
My network label also contain space and somehow it's failing in that case as well. Error : vm network not found. Let me know if anyone faced same issue. |
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. |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Terraform v0.7.3.
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Issue description
Since ticket #8075 there is a bug in working with Virtual Machine names that contain the space character in their name. In #8075 the datastore references have been changed, which uses a split on the space character.
Please revert to resource_vsphere_virtual_machine.go, lines 968 to 978 and review the split on a space character please.
Expected Behavior
What should have happened?
Virtual machine should have been created, with spaces in it's object name (e.g. "ams-web-01.contoso.com (Web Server)" )
Actual Behavior
What actually happened?
The virtual machine was not created, instead Terraform spit out the message "[ERROR] Failed trying to parse disk path:"
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
N/A
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
N/A
For the moment we reverted back to Terraform Terraform v0.6.16. Due to this bug we cannot update Terraform without breaking stuff in our environment.
The text was updated successfully, but these errors were encountered: