code: func (s *SyncState) ResourceInstance(addr addrs.AbsResourceInstance) *ResourceInstance {
  	s.lock.RLock()
  	ret := s.state.ResourceInstance(addr).DeepCopy()
  	s.lock.RUnlock()
  	return ret
  }
docs: // ResourceInstance returns a snapshot of the state the resource instance with
  // the given address, or nil if no such instance is tracked.
  //
  // The return value is a pointer to a copy of the instance state, which the
  // caller may then freely access and mutate.