hello ,
iam new to terraform and i try to create vm on vcenter from a template windows2016
i noticed this issue when i apply
Error: one of windows_options or windows_sysprep_text must exist in VM customization options for Windows operating systems
│
│ with vsphere_virtual_machine.vm[0],
│ on main-actual.tf line 43, in resource “vsphere_virtual_machine” “vm”:
│ 43: resource “vsphere_virtual_machine” “vm” {
that’s the creation on main.tf
resource “vsphere_virtual_machine” “vm” {
count = var.vm-count
name = “${var.vm-name}”
resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
datastore_id = data.vsphere_datastore.datastore.id
guest_id = var.vm-guest-id
num_cpus = var.vm-cpu
memory = var.vm-ram
network_interface {
network_id = data.vsphere_network.network.id
}
disk {
label = “{var.vm-name}-{0 + 1}-disk”
size = 150
}
clone {
template_uuid = data.vsphere_virtual_machine.template.id
customize {
timeout = 0
network_interface {}
}
}
}