This is with the same code posted above and using vSphere Hypervisor 8.03u as the free version without vcenter. It doesn't work for me.
│ Error: error creating virtual machine: ServerFaultCode: Current license or ESXi version prohibits execution of the requested operation.
│
│ with vsphere_virtual_machine.vm,
│ on main.tf line 41, in resource "vsphere_virtual_machine" "vm":
│ 41: resource "vsphere_virtual_machine" "vm" {