Skip to content

Commit 71c8a12

Browse files
committed
feat(lambda): add aws_lambda_provisioned_concurrency_config option
1 parent a884aaf commit 71c8a12

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,11 @@ resource "aws_lambda_function" "main" {
7979
}
8080
}
8181
}
82+
83+
resource "aws_lambda_provisioned_concurrency_config" "main" {
84+
count = var.provisioned_concurrent_executions == null ? 0 : 1
85+
86+
function_name = aws_lambda_function.main.function_name
87+
qualifier = aws_lambda_function.main.version
88+
provisioned_concurrent_executions = var.provisioned_concurrent_executions
89+
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ variable "function_name" {
4848
description = "(Required) A unique name for the Lambda function."
4949
}
5050

51+
variable "provisioned_concurrent_executions" {
52+
type = number
53+
description = "(Optional) Amount of capacity to allocate. Must be greater than or equal to 1."
54+
default = null
55+
}
56+
5157
variable "handler" {
5258
type = string
5359
description = "(Required) The function entrypoint in your code."

0 commit comments

Comments
 (0)