How can I store an object in Terraform state

I want to store an object in the terraform state.What is the correct schema type that I initialize the field which represents the object.

Are you trying to do this from a provider, or in your HCL?

I am trying to do this from my custom provider

I don’t believe there is any mechanism for providers to store objects in the state other than by offering resource objects which the user can create in their configuration.