github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/states/state_equal.go (about) 1 package states 2 3 import ( 4 "reflect" 5 ) 6 7 // Equal returns true if the receiver is functionally equivalent to other, 8 // including any ephemeral portions of the state that would not be included 9 // if the state were saved to files. 10 // 11 // To test only the persistent portions of two states for equality, instead 12 // use statefile.StatesMarshalEqual. 13 func (s *State) Equal(other *State) bool { 14 // For the moment this is sufficient, but we may need to do something 15 // more elaborate in future if we have any portions of state that require 16 // more sophisticated comparisons. 17 return reflect.DeepEqual(s, other) 18 }