-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqs.tf
23 lines (22 loc) · 630 Bytes
/
sqs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
resource "aws_sqs_queue" "terraform_queue" {
name = "my_sqs_queue"
delay_seconds = 90
max_message_size = 2048
message_retention_seconds = 86400
receive_wait_time_seconds = 10
depends_on = [
aws_lambda_function.test_lambda
]
tags = {
Environment = "test"
}
}
#Add Lambda trigger from sqs
resource "aws_lambda_event_source_mapping" "consumer-sqs" {
event_source_arn = aws_sqs_queue.terraform_queue.arn
enabled = true
function_name = aws_lambda_function.test_lambda.arn
depends_on = [
aws_sqs_queue.terraform_queue
]
}