Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6549ca1

Browse files
authoredJun 18, 2024
feat: Added support for alias to have multiple filter criteria same as function (terraform-aws-modules#585)
1 parent 3aa5b7e commit 6549ca1

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)
Please sign in to comment.