Vsphere provider handling nested VM folders?

I am trying to do something that I think is very simple; create nested VM folders using terraform and the vsphere provider. But the provider doesn’t allow it to be done in one tf run? What am I missing?

resource “vsphere_folder” “foundation_folder” {
path = “parent/child”
type = “vm”
datacenter_id = data.vsphere_datacenter.dc.id
}

When I run TF, I get error: Error: error trying to determine parent targetFolder: folder ‘/myDatacenter/vm/parent’ not found.

I can sort of get around it by doing this:

resource “vsphere_folder” “parent_folder” {
path = “parent”
type = “vm”
datacenter_id = data.vsphere_datacenter.dc.id
}
resource “vsphere_folder” “child folder” {
path = “parent/child”
type = “vm”
datacenter_id = data.vsphere_datacenter.dc.id
}

But to do it this way requires two tf runs, the first of which fails because it can’t find parent/child folder. But it creates the parent folder, and subsequent run creates the child folder. TF destroy also requires two runs. Seems really silly to have to do two runs. Is it possible to do this nested folder creation in one shot?