// GetChangesForConfigResource searched the set of resource instance
// changes and returns all changes related to a given configuration address.
// This is be used to find possible changes related to a configuration
// reference.
//
// If no such changes exist, nil is returned.
//
// The returned objects are a deep copy of the change recorded in the plan, so
// callers may mutate them although it's generally better (less confusing) to
// treat planned changes as immutable after they've been initially constructed.
GetChangesForConfigResource searched the set of resource instance
changes and returns all changes related to a given configuration address.
This is be used to find possible changes related to a configuration
reference.

If no such changes exist, nil is returned.

The returned objects are a deep copy of the change recorded in the plan, so
callers may mutate them although it's generally better (less confusing) to
treat planned changes as immutable after they've been initially constructed.
// GetChangesForConfigResource searched the set of resource instance // changes and returns all changes related to a given configuration address . // This is be used to find possible changes related to a configuration // reference . // // If no such changes exist nil is returned . // // The returned objects are a deep copy of the change recorded in the plan so // callers may mutate them although it ' s generally better ( less confusing ) to // treat planned changes as immutable after they ' ve been initially constructed .
func (cs *ChangesSync) GetChangesForConfigResource(addr addrs.ConfigResource) []*ResourceInstanceChangeSrc {
	if cs == nil {
		panic("GetChangesForConfigResource on nil ChangesSync")
	}
	cs.lock.Lock()
	defer cs.lock.Unlock()
	var changes []*ResourceInstanceChangeSrc
	for _, c := range cs.changes.InstancesForConfigResource(addr) {
		changes = append(changes, c.DeepCopy())
	}
	return changes
}
func ( cs * ChangesSync ) GetChangesForConfigResource ( addr addrs . ConfigResource ) [ ] * ResourceInstanceChangeSrc { if cs == nil { panic ( " " ) } cs . lock . Lock ( ) defer cs . lock . Unlock ( ) var changes [ ] * ResourceInstanceChangeSrc for _ , c := range cs . changes . InstancesForConfigResource ( addr ) { changes = append ( changes , c . DeepCopy ( ) ) } return changes }
GetChangesForConfigResource searched the set of resource instance
changes and returns all changes related to a given configuration address.
GetChangesForConfigResource searched the set of resource instance changes and returns all changes related to a given configuration address .