Skip to content

Commit 8675025

Browse files
committed
Point supplier topic at allocation lambda
1 parent 1ee9197 commit 8675025

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
resource "aws_sns_topic_subscription" "amendments_queue" {
2-
topic_arn = module.eventsub.sns_topic_supplier.arn
3-
protocol = "sqs"
4-
endpoint = module.amendments_queue.sqs_queue_arn
5-
#raw_message_delivery = false
1+
resource "aws_sns_topic_subscription" "allocation_lambda" {
2+
topic_arn = module.eventsub.sns_topic_event_bus.arn
3+
protocol = "lambda"
4+
endpoint = module.allocation_lambda.function_arn
5+
}
6+
7+
resource "aws_lambda_permission" "allocation_lambda_sns" {
8+
statement_id = "AllowExecutionFromSNS"
9+
action = "lambda:InvokeFunction"
10+
function_name = module.allocation_lambda.function_name
11+
principal = "sns.amazonaws.com"
12+
source_arn = module.eventsub.sns_topic_supplier.arn
613
}

0 commit comments

Comments
 (0)