There many solutions to this, Azure has Azure app configuration. it basically has all the plumbing and provides the appropriate configuration sources and providers to plugin into the ConfigurationRoot
. This enables you use use the IOptionsMonitor
feature to get real-time updates of configuration changes. Also there should be away to programmatically update it, however I have never tried it.
However, I find that service completely overpriced and clunky for what it is.
On that note, if you are handy with a bit of code, you could create your own ConfigurationSource
and ConfigurationProvider
to point to anywhere you like, for instance a CosmosDb container and do exactly the same thing. You could even use a trigger and signalR to publish those changes to any listening ConfigurationSource
.
There are also various ways you can update a functions or apps configuration at runtime through the CLI etc (I am not sure if there C# management libraries for this, though I guess there is somewhere). However, they will not be real-time and have no inbuilt way of notifying as far as I know.
Which leaves you with the option of just doing a real time look up on a datastore ¯\_(ツ)_/¯
. This way you can update and query at your own will, and will persist naturally.