schema.ResourceImporter and ReadContext

I’m currently going through interesting exercise of generating HCL code for all of resources that our provider supports, so that adoption could be driven quicker - https://github.com/databrickslabs/terraform-provider-databricks/pull/415 - I know that code generation might become part of terraform 0.14, 0.15 or 0.19, but I’m not willing to wait that long :slight_smile:

During this exercise i’m finding out from time to time, that terraform import resource.name id is not always actually importing the full state, but rather just id property and that’s it.

So the question is: should schema.ResourceImporter#StateContext be calling ReadContext of the resource or not? I was observing contradictory behaviour, when i started experimenting with it. Plan to return more to it soon. But seeking insights from Terraform maintainers first.

/cc @paddy