From 38c5a1187b2d9b8d45db955b8e42e263e307e289 Mon Sep 17 00:00:00 2001 From: Brian Dandoy Date: Tue, 8 Oct 2024 17:30:47 -0700 Subject: [PATCH] Fix to all multiple query strings --- examples/complete-alb/main.tf | 8 ++++++-- main.tf | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/complete-alb/main.tf b/examples/complete-alb/main.tf index 67d35ed..d1a6c80 100644 --- a/examples/complete-alb/main.tf +++ b/examples/complete-alb/main.tf @@ -137,10 +137,14 @@ module "alb" { }] conditions = [{ - query_string = { + query_string = [{ key = "video" value = "random" - } + }, + { + key = "image" + value = "next" + }] }] } } diff --git a/main.tf b/main.tf index 79e3f41..7cc03ee 100644 --- a/main.tf +++ b/main.tf @@ -422,7 +422,7 @@ resource "aws_lb_listener_rule" "this" { content { dynamic "query_string" { - for_each = try([condition.value.query_string], []) + for_each = try(flatten([condition.value.query_string]), []) content { key = try(query_string.value.key, null)