Skip to content

Commit

Permalink
feature #3 - Add SQS queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeniosales committed Oct 15, 2022
1 parent e5b79a1 commit 5ed322b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions terraform/sqs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
resource "aws_sqs_queue" "update-exchange-rate-queue" {
name = "update-exchange-rate-queue"
visibility_timeout_seconds = 30
}

resource "aws_sqs_queue_policy" "update-exchange-rate-queue-policy" {
queue_url = aws_sqs_queue.update-exchange-rate-queue.id

policy = <<POLICY
{
"Version": "2012-10-17",
"Id": "update-exchange-rate-queue-policy",
"Statement": [
{
"Sid": "First",
"Effect": "Allow",
"Principal": {
"Service": "events.amazonaws.com"
},
"Action": "sqs:SendMessage",
"Resource": "${aws_sqs_queue.update_transaction_by_fuelling_partner_queue.arn}",
}
]
}
POLICY
}

0 comments on commit 5ed322b

Please sign in to comment.