3 ms·
> Actually I think .NET config is pretty good. You define a file, which can be overridden by environment variables Agreed that it's good. Partly because it's e
by SideburnsOfDoom 1y ago
> Actually I think .NET config is pretty good. You define a file, which can be overridden by environment variables
Agreed that it's good. Partly because it's even more flexible than that. There are good defaults, but you decide which sources in which order are use. e.g. in our case it is
appsettings.json
appsettings.{env}.json (e.g. appsettings.dev.json )
Environment variables
There are also providers for places where secrets are stored, such as Azure Key vault (1), which would be layered on last. And a test provider where you just supply some key-value pairs from code (2). Or roll your own (3).
1) https://learn.microsoft.com/en-us/aspnet/core/security/key-vault-configuration https://learn.microsoft.com/en-us/aspnet/core/security/key-v...
2) https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration-providers#memory-configuration-provider https://learn.microsoft.com/en-us/dotnet/core/extensions/con...
3) https://vinayakabhat.medium.com/integrating-aws-secrets-manager-with-asp-net-core-a-secure-way-to-manage-secrets-cd6f95469dd9 https://vinayakabhat.medium.com/integrating-aws-secrets-mana...