Until now for each of our applications we store application configuration in the same repository as the code that uses the configuration. We have environment specific yml files (dev, test, .., prod) that contain plain text as well as encrypted configuration values. Those get deployed for example as "Application Settings" in Azure. Depending on the type of application (Java Tomcat, .NET webapp, etc.) The configuration values are fetched at runtime from environment variables or configuration files directly.
Now, we would like to decouple the release of the code from release of the configuration. A configuration change should not require us to rebuild and redeploy the application (process, approval, etc). This would be for patches for instance where the application version x.y will fetch the latest configuration for x.y.*.
The natural way to do this is to move the configuration values into a dedicated service that the applications will fetch them from, a REST API, backed by a database for instance. The question is where that external repository gets populated from, where the configuration lives from then on. Two options I see are keeping the configuration in the repository of the application it configures or having a "Configuration" repository holding the configuration of all applications.
I am a big proponent of keeping the code and configuration together in one repository. I just can't really quantify the upsides. Here are a few I can think of.
- Keeping configuration isolated from other applications'. Other application's configuration changes won't affect each other. (Changing a seemingly unshared configuration)
- Review of code and configuration at the same time in the same merge request.
I feel very strongly about this but I don't know why.
I don't see any downsides of keeping the configuration together with the code and no upsides of moving all configuration into the same repository.
Why is it better to store the configuration withalongside the code? Why is it better to store all configuration in the same repository?