code: func (s *State) ResourceInstance(addr addrs.AbsResourceInstance) *ResourceInstance {
  	if s == nil {
  		panic("State.ResourceInstance on nil *State")
  	}
  	ms := s.Module(addr.Module)
  	if ms == nil {
  		return nil
  	}
  	return ms.ResourceInstance(addr.Resource)
  }
docs: // ResourceInstance returns the state for the resource instance with the given
  // address, or nil if no such resource is tracked in the state.