code: func (addr *ResourceAddress) Equals(raw interface{}) bool {
  	other, ok := raw.(*ResourceAddress)
  	if !ok {
  		return false
  	}
  
  	pathMatch := len(addr.Path) == 0 && len(other.Path) == 0 ||
  		reflect.DeepEqual(addr.Path, other.Path)
  
  	indexMatch := addr.Index == -1 ||
  		other.Index == -1 ||
  		addr.Index == other.Index
  
  	nameMatch := addr.Name == "" ||
  		other.Name == "" ||
  		addr.Name == other.Name
  
  	typeMatch := addr.Type == "" ||
  		other.Type == "" ||
  		addr.Type == other.Type
  
  	// mode is significant only when type is set
  	modeMatch := addr.Type == "" ||
  		other.Type == "" ||
  		addr.Mode == other.Mode
  
  	return pathMatch &&
  		indexMatch &&
  		addr.InstanceType == other.InstanceType &&
  		nameMatch &&
  		typeMatch &&
  		modeMatch
  }
docs: // Equals returns true if the receiver matches the given address.
  //
  // The name of this method is a misnomer, since it doesn't test for exact
  // equality. Instead, it tests that the _specified_ parts of each
  // address match, treating any unspecified parts as wildcards.
  //
  // See also Contains, which takes a more heirarchical approach to comparing
  // addresses.