Skip to main content

Managing AppSettings and Secrets With Azure

This documentation provides guidance on managing application settings and secrets efficiently using Azure services. It includes best practices for secure storage, retrieval, and management of sensitive configuration data in your applications.

Key Concepts

Azure AppConfiguration can manage appsettings, secrets and feature flags. These can be imported via a JSON file, that can be defined next to the application code, and deployed to the AppConfiguration instance via the same GitHub Actions used by the application.

The application needs to install the official Azure App Configuration SDK to fetch settings, secrets and feature flags at runtime. The SDK supports hot-reload of settings, so that changes in the AppConfiguration instance are reflected in the application without requiring a restart/deploy. Application can also access secrets stored in KeyVault through AppConfiguration, simplifying the management of sensitive data. Feature flags offer flexibility in dynamically enabling or disabling features without redeploying the application, using built-in or custom rules.

Moreover, it removes the need to set environment variables via Terraform, which slow down development and deploying, other than storing sensitive configuration data directly in the Terraform state file.

A collection of code samples is available on GitHub.

Key Topics