Custom Provider: Adding a new attribute and on import not able to differentiate between the states

I have this schema:

      	server_ids: {
				Type:     schema.TypeSet,
				Optional: true,
				Elem:        &schema.Schema{Type: schema.TypeString},
				Set:         schema.HashString,
				Description: "List of ids",
			},
               prototype: {
    				Type:        schema.TypeSet,
    				Optional:    true,
    				Computed:    true,
    				Description: "List of attachment prototype",
    				Set:         resourcePrototypeHash,
    				Elem: &schema.Resource{
    					Schema: map[string]*schema.Schema{
    						server_id: {
    							Type:        schema.TypeString,
    							Computed:    true,
    						},
    						server_name: {
    							Type:        schema.TypeString,
    							Required:    true,
    						},
    						server_profile: {
    							Type:        schema.TypeString,
    							Required:    true,
    						}, 
    }

server_ids was an existing functionality which took the ids of the existing server and attached it to this resource and we can’t change it since its used by existing customers, so to create/attach a new server we added a prototype key for new servers to be attached.

This works fine and we’re able to differentiate between the old and new changes based on the name and server value.

But I am having trouble in managing the import functionality.

Now suppose we are importing this resource, I am able to get only id, name and server value, which is making it difficult to differentiate between the ids which would go into prototype and which would go into the “server_ids” key.

Normally without import, we have both state and terraform configuration tf file, so we are able to manage the situation.

But on import, we are not and if someone loses the state file and tries to import it, there are difference between the state.

Looking for some suggestions here.

@apparentlymart Is this possible to achieve ?