On main.tf line 151, in resource "vsphere_virtual_machine" "app"

I have the following code in my main.tf

disk = [ 
 {
    label = "disk0"  
    size  = "${lookup(var.app[count.index], "disk1")}"
    unit_number = "0" 
  },  
  {
    label = "disk1"  
    size  = "${lookup(var.app[count.index], "disk2")}"
    unit_number = "1" 
  }
]

After terraform apply I get the following error:

╷
│ Error: Unsupported argument
│ 
│   on main.tf line 151, in resource "vsphere_virtual_machine" "app":
│  151: disk = [
│ 
│ An argument named "disk" is not expected here. Did you mean to define a block of type "disk"?

How do I solve it?

The resource is expecting a block, so it has to be transitioned from the list like:

  dynamic "disk" {
    for_each = var.your_list # should it be var.app ??

    content {
      label            = disk.value.label
      size             = disk.value.size
      unit_number = disk.value.unit_number
    }
  }