File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ This module will deploy a Lambda function. It supports both Zip and Image deploy
2525- ` use_default_security_group ` - (bool) - Use the default security group for the Lambda function.
2626- ` vpc_id ` - (string) - The VPC ID in which the Lambda runs.
2727- ` tracing_mode ` - (string) - Tracing mode for the Lambda. Valid options: PassThrough (default) and Active.
28+ - ` dead_letter_queue_arn ` - (string)- The ARN of the dead letter queue for the Lambda function.
2829
2930### Zip deployment variables
3031- ` runtime ` - (string) - ** REQUIRED** - The runtime environment for the Lambda function you are uploading.
Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ resource "aws_lambda_function" "lambda_function" {
7777 tracing_config {
7878 mode = var. tracing_mode
7979 }
80+
81+ dynamic "dead_letter_config" {
82+ for_each = var. dead_letter_queue_arn != " " ? [1 ] : []
83+ content {
84+ target_arn = var. dead_letter_queue_arn
85+ }
86+ }
8087}
8188
8289resource "aws_cloudwatch_log_group" "lambda_loggroup" {
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ variable "image_config_entry_point" {
1616 default = []
1717}
1818
19+ variable "dead_letter_queue_arn" {
20+ type = string
21+ description = " The ARN of the dead letter queue for the Lambda function."
22+ default = " "
23+ }
24+
1925variable "image_config_working_directory" {
2026 type = string
2127 description = " Optional override of image's WORKDIR"
You can’t perform that action at this time.
0 commit comments