File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,42 @@ resource "aws_appconfig_hosted_configuration_version" "example" {
7979}
8080```
8181
82+ ### Multi-variant Feature Flags
83+
84+ ``` terraform
85+ resource "aws_appconfig_hosted_configuration_version" "example" {
86+ application_id = aws_appconfig_application.example.id
87+ configuration_profile_id = aws_appconfig_configuration_profile.example.configuration_profile_id
88+ description = "Example Multi-variant Feature Flag Configuration Version"
89+ content_type = "application/json"
90+
91+ content = jsonencode({
92+ flags = {
93+ loggingenabled = {
94+ name = "loggingEnabled"
95+ }
96+ },
97+ values = {
98+ loggingenabled = {
99+ _variants = concat([
100+ for user_id in var.appcfg_enableLogging_userIds : { # Flat list of userIds
101+ enabled = true,
102+ name = "usersWithLoggingEnabled_${user_id}",
103+ rule = "(or (eq $userId \"${user_id}\"))"
104+ }
105+ ], [
106+ {
107+ enabled = false,
108+ name = "Default"
109+ }
110+ ])
111+ }
112+ },
113+ version = "1"
114+ })
115+ }
116+ ```
117+
82118## Argument Reference
83119
84120This resource supports the following arguments:
You can’t perform that action at this time.
0 commit comments