There are three directories that the configuration management system will inspect in a module's config folder, which are as follows:
- install
- optional
- schema
The install folder specifies the configuration that will be imported. If the configuration object exists, the installation will fail. The optional folder contains the configuration that will be installed if the following conditions are met:
- The configuration does not already exist
- It is a configuration entity
- Its dependencies can be met
If any one of the conditions fails, the configuration will not be installed, but it will not halt the module's installation process.
The schema folder provides configuration object definitions. This uses YAML definitions to structure configuration objects, and is covered in depth in Chapter 9, Configuration Management - Deploying in Drupal 8.