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