Azure App Configuration

repository·main·Indexed 42 days ago

https://github.com/azure/appconfiguration

A 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.

Tokens
31.6K
Snippets
107
Records
224
Agent score
53%

What's inside Azure App Configuration

  1. Overview of Azure App Configuration

    main

    Azure 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
  2. Core features of Azure App Configuration Go Provider

    main

    The 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.
  3. Use Microsoft Feature Management for Go

    main

    Microsoft 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 FeatureFlagProvider interface to consume flags from different sources.
    • Built-in Filters: Support for Microsoft.TimeWindow and Microsoft.Targeting filters, 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.
  4. Benefits of using Special Types in Azure App Configuration

    main

    Azure 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.
  5. Target framework support for Microsoft.Azure.AppConfiguration.AspNetCore

    main

    The Microsoft.Azure.AppConfiguration.AspNetCore package 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.0 because the framework reached end-of-support.

    When choosing a version, ensure your target .NET runtime is compatible with the package version you are installing.

  6. Exclude users and groups from targeting filters

    main

    When using targeting filters, you can define an Exclusion within an Audience. 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 Audience configuration. If a user or group is listed in the Exclusion, the targeting filter will evaluate to false for them.

    "Exclusion": {
        "Users": [
            "Mark"
        ],
        "Groups": [
            "Admins"
        ]
    }
  7. Use Variant Feature Flags for Rollouts and A/B Testing

    main

    Starting 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.

  8. Use Replica Auto-Discovery for geo-replicated stores

    main

    For 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.ReplicaDiscoveryEnabled to false.

  9. Configure Feature Flag loading and precedence

    main

    The 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.