code: func (d *InstanceDiff) Apply(attrs map[string]string, schema *configschema.Block) (map[string]string, error) {
  	// We always build a new value here, even if the given diff is "empty",
  	// because we might be planning to create a new instance that happens
  	// to have no attributes set, and so we want to produce an empty object
  	// rather than just echoing back the null old value.
  	if attrs == nil {
  		attrs = map[string]string{}
  	}
  
  	// Rather applying the diff to mutate the attrs, we'll copy new values into
  	// here to avoid the possibility of leaving stale values.
  	result := map[string]string{}
  
  	if d.Destroy || d.DestroyDeposed || d.DestroyTainted {
  		return result, nil
  	}
  
  	return d.applyBlockDiff(nil, attrs, schema)
  }
docs: // Apply applies the diff to the provided flatmapped attributes,
  // returning the new instance attributes.
  //
  // This method is intended for shimming old subsystems that still use this
  // legacy diff type to work with the new-style types.