How do I add a view with a module when installing a module? In Drupal 8, I want a view to be created when a module is installed.

I have already used the Features module to export the view, so I have the yml file that creates the view. I can't find what to include in order for this view to be created on installation of my module.

How can I achieve this?
If you have the YAML file, you can put this in: /modules/your_module/config/install.

Then the View will be imported, when the module is installed (but there will be no updates, if you change the YAML file, it will only be imported once).

Btw. to export the YAML file you don't need Features, you can do this with core (admin/config/development/configuration/single/export).

So you can remove the line uuid: from the YAML file, this is only valid for re-importing the YAML to the same or a cloned site.