Unable to retrieve value from settings file inside custom module I have some specific values that will never change. I could use define and set them as constants but having a module_name.settings.yml file seems more appropriate.

The problem is that I can't seem to get the values from that file. It always ends up in null.

I have a module my_module in docroot/modules/custom', it's installed. Inside the root of the module I've created amy_module.settings.ymlfile with a single entry ofhello: 'world'`. 

I've tried retrieving it using:

(\Drupal::config('my_module.settings'))-&gt;get('hello')


But the returned value is null. According to the documentation it should be working fine.

I'm using Drupal 8.

What am I missing here?
You need to put this file into 


  myModule/config/install/my_module.settings.yml


Then uninstall and reinstall.

You ll get your value.