title: How to manage configuration files in microservice architecture among multiple deployment environments?
body: <p>I'm looking for a way to manage configuration files for multiple modules in a large system using microservice architecture (.NET Core).</p>
  
  <p>Currently we have 5 modules and counting. Each module comprises 2 projects (say UI and API). Each project has different configuration for 3 environments Dev, Staging, Production.</p>
  
  <p>5 modules x 2 projects x 3 environments = 30 configuration files.</p>
  
  <p>Many of the projects need the same configuration values repeated verbatim for all development environments (for example where a shared package requires configuration). </p>
  
  <p>Much of the time the same configuration is required for each project and environment, but sometimes it varies and sometimes it is completely project specific.</p>
  
  <p>This is only going to get worse. More modules will be added and the configuration files will get bigger. A solution I'm mulling over is to write a script that does a find and replace in all configuration files based on a master configuration file that has all values for all projects and environments.</p>
  
  <p>But even this seems daunting as I'm not yet sure how I'd layout the master configuration file or make it clear which configuration keys belonged to which projects.</p>
  
  <p>This is becoming very difficult to manage and I'd like to know if anyone has a good process for managing this?</p>