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
vsphere_virtual_disk does not support datastore clusters #638
Comments
+1 |
1 similar comment
+1 |
Hi @kaizoku0506! Adding support for placing a Can I get some additional details on the use case this would cover? I'm trying to work out if there is already a solution in place that could help or what the best way to implement an enhancement would be. If the goal is to create a disk that can be managed through SDRS and attached to a virtual machine, you can use a configuration like this:
I suspect that doesn't cover the use case, but some extra help on describing it will hopefully get this moving along. |
Bill, In my case I want to create new machines with any number of disks, using a counter for example without the need of multiple templates and some feature flags tricks. I've tried to add this concept to a plan and the lack of attach option to disks created outside a virtual_machine resource I can't make my plan work. Theres a option to create a machine with some kind of counter, like the virtual_machine have, but for disks? My use case is for big data vm's that 4 disks of 250gb is better than a fat 1tb disk, I use terraform as a generic infrastructure builder using a pipeline and more generic and DRY better it is. I want to have very minimum number of modules to as much possibilities of reuse as I can. If I have the option to create as many disks I need for a vm, doesn't matter if it is using datasore or disek resoure or a disk counter inside the virtual_machine resource. Just having this option makes it much more generic and flexible. Thanks. |
I am dealing with the same sort of issue. I need to be able to add disks using terraform and attach them. Similar to @amioranza I need to be able to tell terraform how many disks and the sizing of them. I haven't been able to find a good explanation. Thanks! |
Hi @amioranza & @pgrinstead1! The See the documentation on dynamic for more information, and the example below for how they can be utilized with the
|
This has been released in version 2.0.0 of the provider. To upgrade, change your provider block: provider "vsphere" {
version = "~> 2.0.0"
}
# ... other configuration ... |
Terraform Version
v0.11.8
vSphere Provider Version
v1.8.1
Affected Resource(s)
vsphere_virtual_disk
vsphere_virtual_machine
Terraform Configuration Files
Expected Behavior
the new virtual_disk should be created in the specified datastore_cluster (ideally on the same datastore as the virtual_machine to which is gets mounted)
Actual Behavior
Terraform fails complaining that datastore is required for vsphere_virtual_disk and that that datastore_cluster is not recognized. datastore_cluster_id fails on when using a datastore_cluster in the disk block of the vsphere_virtual_machine resource.
Steps to Reproduce
terraform plan
The text was updated successfully, but these errors were encountered: