code: func (m schemaMap) Data(
  	s *terraform.InstanceState,
  	d *terraform.InstanceDiff) (*ResourceData, error) {
  	return &ResourceData{
  		schema:       m,
  		state:        s,
  		diff:         d,
  		panicOnError: m.panicOnError(),
  	}, nil
  }
docs: // Data returns a ResourceData for the given schema, state, and diff.
  //
  // The diff is optional.