Skip to content

Commit 068a578

Browse files
authored
fix: To allow multiple query strings as an OR statement (#383)
1 parent e7ff03d commit 068a578

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

examples/complete-alb/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@ module "alb" {
137137
}]
138138

139139
conditions = [{
140-
query_string = {
140+
query_string = [{
141141
key = "video"
142142
value = "random"
143-
}
143+
},
144+
{
145+
key = "image"
146+
value = "next"
147+
}]
144148
}]
145149
}
146150
}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ resource "aws_lb_listener_rule" "this" {
422422

423423
content {
424424
dynamic "query_string" {
425-
for_each = try([condition.value.query_string], [])
425+
for_each = try(flatten([condition.value.query_string]), [])
426426

427427
content {
428428
key = try(query_string.value.key, null)

0 commit comments

Comments
 (0)