code: func ParseResourceAddressForInstanceDiff(path []string, key string) (*ResourceAddress, error) {
  	addr, err := parseResourceAddressInternal(key)
  	if err != nil {
  		return nil, err
  	}
  	addr.Path = path
  	return addr, nil
  }
docs: // ParseResourceAddressForInstanceDiff creates a ResourceAddress for a
  // resource name as described in a module diff.
  //
  // For historical reasons a different addressing format is used in this
  // context. The internal format should not be shown in the UI and instead
  // this function should be used to translate to a ResourceAddress and
  // then, where appropriate, use the String method to produce a canonical
  // resource address string for display in the UI.
  //
  // The given path slice must be empty (or nil) for the root module, and
  // otherwise consist of a sequence of module names traversing down into
  // the module tree. If a non-nil path is provided, the caller must not
  // modify its underlying array after passing it to this function.