'terraform should forward two rules to one sqs-que
I do not understand how I can tell terraform that it should create two rules for an aws-eventbridge which should send an event to the same sqs-queue if a rule is triggered. Example below. It is working in aws if i configure it over the aws-management console
source = "terraform-aws-modules/eventbridge/aws"
version = "1.14.0"
bus_name = "staging"
rules = {
update = {
description = "Event_To_SQS_Staging"
enabled = true
event_pattern = jsonencode({
source = [
"service"
]
detail = {
email = [{
prefix = "testeventbridge"
}]
}
})
},
delete = {
description = "Delete_Event_To_SQS_Staging"
enabled = true
event_pattern = jsonencode({
source = [
"service"
],
detail-type = [
"DeleteEvent"
]
})
}
}
targets = {
update = [
{
name = aws_sqs_queue.event_queue_staging.name
arn = aws_sqs_queue.event_queue_staging.arn
}
],
delete = [
{
name = aws_sqs_queue.event_queue_staging.name
arn = aws_sqs_queue.event_queue_staging.arn
}
]
}
}
the error i see is
Two different items produced the key "EventQueue" in this
│ 'for' expression. If duplicates are expected, use the ellipsis (...) after
│ the value expression to enable grouping by key.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
