I have ASP.Net Core 3.1 application & it has environment based appsettings.json as
- appSettings.UAT.json
- appSettings.Dev.json
- appSettings.Prod.json
When the app is published/deployed to any env say UAT, all the appsettings.json gets deployed to the UAT machine.
The requirement is that if the machine/env is UAT, then only below appSettings should be deployed
- appSettings.json
- appSettings.UAT.json
& if the env is Prod then
- appSettings.json
- appSettings.Prod.json
I know the other way is to store/fetch configuration from Environment variables rather appSettings.json but for now that has extra cost for me.
Thanks!