`r/virtual_machine`: add support for allowing additional disks on different datastore clusters
Community Guidelines
- [X] I have read and agree to the HashiCorp Community Guidelines .
- [X] Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
- [X] Do not leave "+1" or other comments that do not add relevant information or questions.
- [X] If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
According to https://github.com/hashicorp/terraform-provider-vsphere/pull/447 It was decided that:
When datastore_cluster_id is in use, datastore assignment to individual disks is not possible, nor is it possible to use this with a VM that is attaching an external disk. This decision was made to simplify the workflows that Terraform would need to handle.
However, we'd like to ask for reconsidering the former. We would like to abililty to provision extra disks on datastores/datastore clusters that are different from the VM's datastore_cluster_id
Use Case(s)
In our environment we have two different types of datatores, "Gold" and "Silver". OS disks are generally deployed to "Gold" datastores. Some workloads are deployed on a "Silver" when they do not need high performance or use more capacity. With this change we would gain the ability to provision a VM on the standard "Gold" datastore, with additional disks on the "Silver" datastores.
Potential Terraform Provider Configuration
resource "vsphere_virtual_machine" "vm" {
name = "terraform-test"
resource_pool_id = "${data.vsphere_compute_cluster.cluster.resource_pool_id}"
datastore_cluster_id = "${data.vsphere_datastore_cluster.datastore_cluster_gold.id}"
num_cpus = 2
memory = 1024
guest_id = "other3xLinux64Guest"
network_interface {
network_id = "${data.vsphere_network.network.id}"
}
disk {
label = "disk0"
size = 20
}
disk {
label = "disk1"
size = 20
datastore_cluster_id = "${data.vsphere_datastore_cluster.datastore_cluster_silver.id}"
}
}
References
https://github.com/hashicorp/terraform-provider-vsphere/pull/447
We need too, same use-case. Attaching extra disks on a different datastore cluster is possible using the vsphere client, so I expect it's also possible using the API.
Is there any progress with this?
Is there any progress with this?
I don't think so. I also need this. :(