Terraform logs report: Error: Post "https://vcenterfqdn/pbm": context deadline exceeded: RESOURCE (vm-<ID>), ACTION (PolicyIDByVirtualMachine)
var/log/vmware/vpxd.log on the vCenter, you will see multiple eager zeroed thick disk create tasks--> deviceChange = (vim.vm.device.VirtualDeviceSpec) [--> (vim.vm.device.VirtualDeviceSpec) {--> operation = "add",--> fileOperation = "create",--> device = (vim.vm.device.VirtualDisk) {
--> thinProvisioned = false,--> eagerlyScrub = true,--> sharing = "sharingNone",
var/log/hostd.log on the ESXi host, you will see below entries where disk creation tasks are completedCreateDisk: Specified disk size is ###### KB
Disk created successfully.
Example:
resource "vsphere_virtual_machine" "vm" { # ... other configuration ...
timeouts { create = "20m" update = "20m" delete = "20m" }}
If immediate disk zeroing is not required, change the disk type to thin. This allows the reconfiguration task to complete nearly instantaneously.
Example:
Set eagerly_scrub = false and thin_provisioned = true.