Azure App Configuration
repository·main·Indexed 42 days ago
https://github.com/azure/appconfigurationA centralized cloud service for managing application settings and feature flags. It supports Key Vault References for sensitive data, AI Chat Configuration for dynamic AI parameters, and feature management via feature flags. Includes tooling for importing and exporting key-values using the 'appconfig/kvset' profile with Azure CLI version 2.30.0 or later.
What's inside Azure App Configuration
- The Azure App Configuration Emulator is a local development tool that provides a lightweight implementation of the Azure App Configuration service. It allows developers to test and develop applications locally without requiring an active Azure subscription or a connection to the cloud service.
Overview of Azure App Configuration
mainAzure App Configuration is a managed service for centralizing application configuration. It allows you to create App Configuration stores to manage key-value settings. These settings can be consumed by various entities, including:
- Applications
- Build pipelines
- Release processes
- Microservices
- Other Azure resources
Core features of Azure App Configuration Go Provider
mainThe Go provider provides the following core capabilities for managing application configuration:
- Authentication: Supports both connection strings and Microsoft Entra ID.
- Configuration Loading: Uses key-value selectors to load and compose configuration, including support for key prefix trimming.
- Data Binding: Supports strongly-typed struct data binding and returning key-values as raw JSON bytes.
- Secrets: Provides Key Vault reference resolution, including periodic resolution to fetch the latest secret versions.
- Dynamic Refresh: Supports dynamic configuration refresh via sentinel keys or by monitoring all selected key-values.
Use Microsoft Feature Management for Go
mainMicrosoft Feature Management for Go provides built-in functionality for consuming feature flags. It supports basic boolean feature flags, feature filters, and variant feature flags (which allow for multiple states or complex JSON configurations for A/B testing and rollouts).
Key capabilities include:
- Feature Flag Providers: An extensibility point via the
FeatureFlagProviderinterface to consume flags from different sources. - Built-in Filters: Support for
Microsoft.TimeWindowandMicrosoft.Targetingfilters, as well as custom filters. - Variant Feature Flags: Support for enhanced flags that return different configurations (primitives or JSON objects) instead of just a boolean state.
- Feature Flag Providers: An extensibility point via the
Benefits of using Special Types in Azure App Configuration
mainAzure App Configuration's Special Types provide several advantages over standard key-value pairs:
- Validation: Built-in schema validation ensures configuration correctness.
- Type Safety: Structured data with well-defined properties and constraints.
- Documentation: Self-documenting configuration with clear property descriptions.
- Tooling Support: Enhanced IDE support and validation during development.
- Consistency: Standardized formats across applications and environments.
Target framework support for Microsoft.Azure.AppConfiguration.AspNetCore
mainThe
Microsoft.Azure.AppConfiguration.AspNetCorepackage provides integration for Azure App Configuration within ASP.NET Core applications.Key framework support notes:
- .NET 8: Supported as of version
7.2.0. - .NET Core 3.1: Support was removed in version
7.0.0because the framework reached end-of-support.
When choosing a version, ensure your target .NET runtime is compatible with the package version you are installing.
- .NET 8: Supported as of version
Exclude users and groups from targeting filters
mainWhen using targeting filters, you can define an
Exclusionwithin anAudience. This allows you to fine-tune targeting by explicitly preventing certain users or groups from accessing a feature.Note: Exclusions take priority over any other section of the
Audienceconfiguration. If a user or group is listed in theExclusion, the targeting filter will evaluate tofalsefor them."Exclusion": { "Users": [ "Mark" ], "Groups": [ "Admins" ] }Use TargetingHttpContextMiddleware for telemetry and context
mainTheTargetingHttpContextMiddleware(introduced in 4.0.0-preview2) persists targeting context in the current activity. This is essential when setting up Telemetry to ensure targeting information is correctly captured and available fromHttpContexton each request.Use Variant Feature Flags for Rollouts and A/B Testing
mainStarting with version 2.0.0, the Python feature management library supports variant feature flags. Unlike standard boolean flags, variant flags allow for multiple states or variations. These variations can range from simple primitive values to complex JSON objects.
This feature is designed for:
- Feature rollouts
- Configuration rollouts
- Feature experimentation (A/B testing)
Variants allow you to return different configurations to different users within the same feature flag toggle.
Enable monitoring of all selected key-values
mainBy default, the provider can watch a sentinel key for changes. However, since version 2.1.0, you can choose to monitor all selected key-values instead. If any selected key-value is updated, the target ConfigMaps and Secrets will be refreshed. Watching a sentinel key is now an optional behavior.Use Replica Auto-Discovery for geo-replicated stores
mainFor App Configuration stores with geo-replication enabled, the provider can automatically discover and connect to additional replicas if the primary endpoint fails. This enhances resiliency without requiring code changes or redeployments.
Replica discovery is enabled by default. To disable this behavior, set
AzureAppConfigurationOptions.ReplicaDiscoveryEnabledtofalse.Configure Feature Flag loading and precedence
mainThe provider supports loading feature flags from Azure App Configuration.
- Enhanced Feature Flags: As of 2.7.0-preview, the provider supports loading and refreshing enhanced feature flags from the dedicated feature flag endpoint.
- Precedence: Standard feature flags are still supported. If an enhanced feature flag and a standard feature flag share the same name, the enhanced feature flag takes precedence.
- Default Behavior: If no selector is specified under
AzureAppConfigurationOptions.featureFlagOptions, the provider loads all feature flags with no label.