code: func (s *ResourceState) Equal(other *ResourceState) bool {
  	s.Lock()
  	defer s.Unlock()
  
  	if s.Type != other.Type {
  		return false
  	}
  
  	if s.Provider != other.Provider {
  		return false
  	}
  
  	// Dependencies must be equal
  	sort.Strings(s.Dependencies)
  	sort.Strings(other.Dependencies)
  	if len(s.Dependencies) != len(other.Dependencies) {
  		return false
  	}
  	for i, d := range s.Dependencies {
  		if other.Dependencies[i] != d {
  			return false
  		}
  	}
  
  	// States must be equal
  	if !s.Primary.Equal(other.Primary) {
  		return false
  	}
  
  	return true
  }
docs: // Equal tests whether two ResourceStates are equal.