Skip to content

Commit

Permalink
Changed "disks" block (Issue #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilpozzd authored May 24, 2022
1 parent 6cb12ce commit 94d5018
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ resource "vsphere_virtual_machine" "this" {
network_id = network_interface.value
}
}

dynamic "disk" {
for_each = var.disks
content {
label = disk.value["label"]
size = disk.value["size"]
thin_provisioned = defaults(disk.value["thin_provisioned"], false)
io_share_count = 1000
eagerly_scrub = lookup(disk.value, "eagerly_scrub", false)
thin_provisioned = index(var.disks, disk.value) == 0 ? false : lookup(disk.value, "thin_provisioned", false)
io_share_count = index(var.disks, disk.value) == 0 ? 1000 : 0
unit_number = index(var.disks, disk.value)
}
}
Expand Down

0 comments on commit 94d5018

Please sign in to comment.