code: func (s *Server) initializeCAConfig() (*structs.CAConfiguration, error) {
  	state := s.fsm.State()
  	_, config, err := state.CAConfig()
  	if err != nil {
  		return nil, err
  	}
  	if config != nil {
  		return config, nil
  	}
  
  	config = s.config.CAConfig
  	if config.ClusterID == "" {
  		id, err := uuid.GenerateUUID()
  		if err != nil {
  			return nil, err
  		}
  		config.ClusterID = id
  	}
  
  	req := structs.CARequest{
  		Op:     structs.CAOpSetConfig,
  		Config: config,
  	}
  	if _, err = s.raftApply(structs.ConnectCARequestType, req); err != nil {
  		return nil, err
  	}
  
  	return config, nil
  }
docs: // initializeCAConfig is used to initialize the CA config if necessary
  // when setting up the CA during establishLeadership