fix(vmware): using map instead of list for disk definiton
This commit is contained in:
parent
0adadb706c
commit
6097ca652d
|
@ -5,8 +5,7 @@ variable "vms" {
|
||||||
cpu = number
|
cpu = number
|
||||||
ram = number
|
ram = number
|
||||||
guest_id = string
|
guest_id = string
|
||||||
disks = list(object({
|
disks = map(object({
|
||||||
name = string
|
|
||||||
size = string
|
size = string
|
||||||
}))
|
}))
|
||||||
network_interfaces = map(object(
|
network_interfaces = map(object(
|
||||||
|
@ -77,7 +76,7 @@ resource "vphere_virtual_virtual_machine" "vm" {
|
||||||
dynamic "disk" {
|
dynamic "disk" {
|
||||||
for_each = each.key.disks
|
for_each = each.key.disks
|
||||||
content {
|
content {
|
||||||
label = each.key.name
|
label = each.key
|
||||||
size = each.key.size
|
size = each.key.size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue