Terrafrom vmware device 0 error

Hi Team, i get below error during the terrafrom apply.
i tried to add the addional disks . Any idea why i get this ?

Error: error reconfiguring virtual machine: error reconfiguring virtual machine: Invalid configuration for device ‘0’.

creates variable number of data disks for VM

dynamic “disk” {
for_each = [for disk in local.disks : disk]

content {
  label       = "disk${disk.value.id}"
  size        = disk.value.sizeGB
  datastore_id = data.vsphere_datastore.datastore.id
  # scsi_controller = 0
  unit_number = disk.value.id
  eagerly_scrub    = "${data.vsphere_virtual_machine.template.disks.0.eagerly_scrub}"
  thin_provisioned = "${data.vsphere_virtual_machine.template.disks.0.thin_provisioned}"

}

}

Have the same issue, u got a solution ?

Thx