Terraform User Assigned Managed Identities

We are switching from System Assigned Managed Identity in some places, but also Azure AD groups in others. Instead we are going to use User Assigned Managed Identity.

But I cannot find a way to assign a UMI to a resource that is one level above where the UMI is created. So, we got 2 state files and the top must be created before the bottom one. So the bottom has a lot of dependencies on the top one but it cannot go the otherway around.

Therefore I an asking, is there any way to assign a UMI to a data resource (data referenced resource)? So, that I connect the UMI to the resource instead of the other way around?