Terraform tips and tricks

NOTE: this is WIP

Terraform provider VMware

Get your hosts resourcepool ID by selecting the host(s)

variable "hosts" {
default = [
"esx-01.example.com",
"esx-02.example.com",
"esx-03.example.com"
]
}
data "vsphere_resource_pool" "resource_pool" {
count = length(var.hosts)
name = "${data.vsphere_host.hosts.*.name[count.index]}/Resources"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
}