Configuration Framework In Azure For .Net
Configuration are of 2 types
- config → Stored in azure app config
- secrets → Stored in azure key vault
Azure components
- App Config → Has entries for config. Has entries of reference to secrets
- Key vault → Has secrets
- Redis cache → Configs labelled shared are cached to redis cache
- C# ConfigProvider module → Connects to the App config/Cache to fetch the values for config keys
Design

- .Net application passes the key for which value is needed to Config provider
2.1 Config provider checks with cache module if the key exists. If yes returns it.
3. 1 If the key is labelled as shared then checked in redis cache.
3.2 If not labelled shared then checked in environment variable.
2.2 If the key is not cached it is fetched from the azure app config. Then cached to either redis or environment variable(local cache)
Note: Azure app config is loaded with secrets as well. Access needs to be restricted to app config too.