Description
Describe the feature
When creating an AppConfig profile of type FeatureFlag, I cannot control the JSON schema. This is an example result when querying the AppConfig service for a FeatureFlag profile:
{"test-flag-1":{"enabled":false},"test-flag-2":{"enabled":true}}
This doesn't play nice with the .NET builder.Configuration... because it lacks a named wrapper node. All my feature flags are defined at the root.
I'd like to the ability to specify a base node to nest the AppConfig profile under. For example, I'd like the ability to register my feature flags with the builder.Configuration system under a "FeatureFlags" node:
builder.Services.Configure<Dictionary<string, AppConfigFeatureFlag>>(builder.Configuration.GetSection("FeatureFlags"));
Use Case
I cannot use FeatureFlag AppConfig profiles very cleanly because the feature flags all end up nested under the root of the configuration tree.
Proposed Solution
builder.Configuration.AddAppConfig(new AppConfigConfigurationSource
{
ApplicationId = "idp-auth-s2s-svc",
EnvironmentId = "Default",
ConfigProfileId = "my-appconfig-configuration-profile",
AwsOptions = new AWSOptions(),
ReloadAfter = new TimeSpan(0, 0, 30),
WrapperNodeName = "FeatureFlags" // Add a wrapper node name here
})
Other Information
Pull request at #229
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS .NET SDK and/or Package version used
Targeted .NET Platform
.NET 8
Operating System and version
macOS Sequoia 15.5