Skip to content

Commit

Permalink
feat: Added support for alias to have multiple filter criteria same a…
Browse files Browse the repository at this point in the history
…s function (#585)
  • Loading branch information
aleboarna authored Jun 18, 2024
1 parent 3aa5b7e commit 6549ca1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/alias/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,12 @@ resource "aws_lambda_event_source_mapping" "this" {
for_each = try(each.value.filter_criteria, null) != null ? [true] : []

content {
filter {
pattern = try(each.value["filter_criteria"].pattern, null)
dynamic "filter" {
for_each = try(flatten([each.value.filter_criteria]), [])

content {
pattern = try(filter.value.pattern, null)
}
}
}
}
Expand Down

0 comments on commit 6549ca1

Please sign in to comment.