fix(vmware): using data providers instead of vm definition values
This commit is contained in:
parent
97091fb95e
commit
eaea580fef
|
@ -14,8 +14,6 @@ variable "vms" {
|
|||
mac = string
|
||||
}
|
||||
))
|
||||
resource_pool_id = string
|
||||
datastore_id = string
|
||||
folder = string
|
||||
}
|
||||
))
|
||||
|
@ -57,10 +55,10 @@ data "vsphere_network" "network" {
|
|||
|
||||
resource "vsphere_virtual_virtual_machine" "vm" {
|
||||
for_each = var.vms
|
||||
iterator = "machine"
|
||||
iterator = "machines"
|
||||
name = "${machine.key}.${machine.value.domain}"
|
||||
resource_pool_id = "${machine.key.resource_pool_id}"
|
||||
datastore_id = machine.key.datastore_id
|
||||
resource_pool_id = data.vsphere_resource_pool.id
|
||||
datastore_id = data.vsphere_datastore.id
|
||||
folder = machine.folder
|
||||
num_cpus = machine.cpu
|
||||
memory = machine.ram
|
||||
|
|
Loading…
Reference in New Issue