I am trying to setup a hosted configuration version in app config for a feature flag with some attributes (https://aws.amazon.com/blogs/mt/using-aws-appconfig-feature-flags/)
"AppConfigProfileId": {
"Type": "AWS::AppConfig::ConfigurationProfile",
"Properties": {
"ApplicationId": {
"Ref": "AppConfig"
},
"Description": "Top level container for all the feature flags in Foo Service",
"Name": "FeatureFlags",
"LocationUri": "hosted",
"Type": "AWS.AppConfig.FeatureFlags"
}
},
"AppConfigFeatureFlagVersion": {
"Type": "AWS::AppConfig::HostedConfigurationVersion",
"Properties": {
"ApplicationId": {
"Ref": "AppConfig"
},
"ConfigurationProfileId": {
"Ref": "AppConfigProfileId"
},
"Content": {
"Fn::Join": [
"\n",
[
"{",
" \"flags\": {",
" \"isFooFlagEnabled\": {",
" \"name\": \"isFooFlagEnabled\"",
" }",
" },",
" \"values\": {",
" \"isFooFlagEnabled\": {",
" \"enabled\": false",
" }",
" },",
" \"version\": \"1\"",
"}"
]
]
},
"ContentType": "application/json",
"Description": "Hosted configuration version for foo flag"
}
}
I am trying to add an extra attribute attached to isFooFlagEnabled called percentEnabled
I would like that flag to
- Be a number
- Be constrained to be in between 0 and 100.
What is the syntax/CFN code to accomplish this. I have been looking around cloudformation and app config documentation and so far have not found a solution.