Is it possible to define default config entities in a single yml file? Following drupal handbook I've created configuration entity type. All works fine except that I have to create ~100 default entities. It would be significantly easier to maintain these default entities if I could define them in a single YML file but that does not work as expected.

If I create files like this:

config/install/example.entity.id1.yml
config/install/example.entity.id2.yml
config/install/example.entity.id3.yml


The config entities are created correctly. However if I create one file config/install/example.entity.yml:

id1:
  field1: val1
  field2: val2

id2:
  field1: val1
  field2: val3

id3:
  field1: val4
  field2: val12


Drupal creates simple config with key example.entity. I'd expected it to create config entities as defined in schema file.

It would be real pain to manage those default config entities with 100 separate files instead of having everything in one yml file. Is this expected behaviour?
According to Configuration Storage in Drupal 8:


  Configuration Entities must each be put into their own YAML files, and they should be generated by having the module write out its configuration (don't try writing them by hand).


So it sounds like what you're experiencing is indeed the expected behaviour, and for the time being at least, you'll need to separate each default entity into its own YAML file.