Open asteriskie opened 6 days ago
Hello, asteriskie! 🖐
Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.
If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.
Community Guidelines
Terraform
1.7.1
Terraform Provider
hashicorp/vsphere
VMware vSphere
8.0.3.00400
Description
Not sure if my tf version has anything to do with this but can try if it truly is related. It would seem that the following is true: I can create a vsphere_virtual_machine resource fine I can create the vsphere_virtual_disk resource fine
What I cannot do is create them, then attach them in the same
terraform apply
.For example, I am creating the vsphere_virtual_machine with a single boot disk and a secondary disk that is created separately from the vm....hence the vsphere_virtual_disk
Scenario 1: When I try to include that secondary disk as an attachment to the vm, when the virtual machine is initially created, it will not attach as it keeps asking about the datastore_id even though I am explicitly setting it.
Scenario 2: When I try to create the vsphere_virtual_disk and the vsphere_virtual_machine independently but do not attach the first time through, it creates all resources. From there I can re-enable the code to attach the volume in which the vm then allows the volume to be attached to the vm as intended.
Hopefully these 2 scenarios make sense. As you can imagine I would quite like for scenario 1 to work.
These are not being created presently on a clustered datastore.
I'm sorry I cannot provide full code but I followed the documentation and that code really is enough just need to attach the volume.
Affected Resources or Data Sources
resource/vsphere_virtual_disk resource /vshpere_virtual_machine
Terraform Configuration
Debug Output
would rather not post what was requested:
Panic Output
No response
Expected Behavior
Allow both the vm and the disk to be created with the disk attached on first runthrough.
Actual Behavior
Receive error about missing a datastore_id even though it's been provided.
Steps to Reproduce
Use document sample code to create a vm and disk but DO include a secondary disk as an attached disk. Do not run without as it will create a vm and disk separately fine.
Environment Details
No response
Screenshots
No response
References
No response