code: func (s *State) AddModule(path addrs.ModuleInstance) *ModuleState {
  	s.Lock()
  	defer s.Unlock()
  
  	return s.addModule(path)
  }
docs: // AddModule adds the module with the given path to the state.
  //
  // This should be the preferred method to add module states since it
  // allows us to optimize lookups later as well as control sorting.