code: func diffFromValues(prior, planned cty.Value, res *Resource, cust CustomizeDiffFunc) (*terraform.InstanceDiff, error) {
  	instanceState, err := res.ShimInstanceStateFromValue(prior)
  	if err != nil {
  		return nil, err
  	}
  
  	configSchema := res.CoreConfigSchema()
  
  	cfg := terraform.NewResourceConfigShimmed(planned, configSchema)
  	removeConfigUnknowns(cfg.Config)
  	removeConfigUnknowns(cfg.Raw)
  
  	diff, err := schemaMap(res.Schema).Diff(instanceState, cfg, cust, nil, false)
  	if err != nil {
  		return nil, err
  	}
  
  	return diff, err
  }
docs: // diffFromValues takes an additional CustomizeDiffFunc, so we can generate our
  // test fixtures from the legacy tests. In the new provider protocol the diff
  // only needs to be created for the apply operation, and any customizations
  // have already been done.