Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
johnricords committed Jul 2, 2024
1 parent 4dfc9b8 commit 7f965ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ resource "aws_cloudwatch_event_target" "this" {
event_bus_name = each.value.event_bus_name

dynamic "dead_letter_config" {
for_each = each.value.dead_letter_config != null ? [1] : []
for_each = each.value.dead_letter_config != null ? [each.value.dead_letter_config] : []
content {
arn = each.value.dead_letter_config.arn
arn = dead_letter_config.value.arn
}
}

Expand All @@ -32,9 +32,9 @@ resource "aws_cloudwatch_event_target" "this" {
}

dynamic "sqs_target" {
for_each = each.value.sqs_target != null ? [1] : []
for_each = each.value.sqs_target != null ? [each.value.sqs_target] : []
content {
message_group_id = each.value.sqs_target.message_group_id
message_group_id = sqs_target.value.message_group_id
}
}
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ variable "event_rule" {
}))

sqs_target = optional(object({
message_group_id = optional(string)
message_group_id = string
}))

})), [])
Expand Down

0 comments on commit 7f965ad

Please sign in to comment.