Skip to content

Commit 8ebe70f

Browse files
Alexandra BoarnaAlexandra Boarna
Alexandra Boarna
authored and
Alexandra Boarna
committed
fix(alias): added support for alias to have multiple filter criteria event source mappings, same as lambda function
1 parent 3aa5b7e commit 8ebe70f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/alias/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,12 @@ resource "aws_lambda_event_source_mapping" "this" {
167167
for_each = try(each.value.filter_criteria, null) != null ? [true] : []
168168

169169
content {
170-
filter {
171-
pattern = try(each.value["filter_criteria"].pattern, null)
170+
dynamic "filter" {
171+
for_each = try(flatten([each.value.filter_criteria]), [])
172+
173+
content {
174+
pattern = try(filter.value.pattern, null)
175+
}
172176
}
173177
}
174178
}

0 commit comments

Comments
 (0)