Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Commit 15f87db

Browse files
wavemoranmoritzzimmer
authored andcommitted
adds reserved_concurrent_executions
1 parent 7acb147 commit 15f87db

File tree

4 files changed

+34
-22
lines changed

4 files changed

+34
-22
lines changed

main.tf

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
module "lambda" {
2-
source = "./modules/lambda"
3-
description = var.description
4-
environment = var.environment
5-
filename = var.filename
6-
function_name = var.function_name
7-
handler = var.handler
8-
memory_size = var.memory_size
9-
publish = var.publish
10-
runtime = var.runtime
11-
timeout = var.timeout
12-
tags = var.tags
13-
vpc_config = var.vpc_config
2+
source = "./modules/lambda"
3+
description = var.description
4+
environment = var.environment
5+
filename = var.filename
6+
function_name = var.function_name
7+
handler = var.handler
8+
memory_size = var.memory_size
9+
publish = var.publish
10+
reserved_concurrent_executions = var.reserved_concurrent_executions
11+
runtime = var.runtime
12+
timeout = var.timeout
13+
tags = var.tags
14+
vpc_config = var.vpc_config
1415
}
1516

1617
module "event-cloudwatch-scheduled-event" {

modules/lambda/main.tf

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ resource "aws_lambda_function" "lambda" {
66
variables = environment.value.variables
77
}
88
}
9-
filename = var.filename
10-
function_name = var.function_name
11-
handler = var.handler
12-
memory_size = var.memory_size
13-
publish = var.publish
14-
role = aws_iam_role.lambda.arn
15-
runtime = var.runtime
16-
source_code_hash = filebase64sha256(var.filename)
17-
tags = var.tags
18-
timeout = var.timeout
9+
filename = var.filename
10+
function_name = var.function_name
11+
handler = var.handler
12+
memory_size = var.memory_size
13+
publish = var.publish
14+
reserved_concurrent_executions = var.reserved_concurrent_executions
15+
role = aws_iam_role.lambda.arn
16+
runtime = var.runtime
17+
source_code_hash = filebase64sha256(var.filename)
18+
tags = var.tags
19+
timeout = var.timeout
1920

2021
dynamic "vpc_config" {
2122
for_each = length(var.vpc_config) < 1 ? [] : [var.vpc_config]

modules/lambda/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ variable "publish" {
4545
default = false
4646
}
4747

48+
variable "reserved_concurrent_executions" {
49+
description = "The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1."
50+
default = "-1"
51+
}
52+
4853
variable "tags" {
4954
description = "A mapping of tags to assign to the Lambda function."
5055
type = map(string)

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ variable "publish" {
6262
default = true
6363
}
6464

65+
variable "reserved_concurrent_executions" {
66+
description = "The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1."
67+
default = "-1"
68+
}
69+
6570
variable "runtime" {
6671
description = "The runtime environment for the Lambda function you are uploading. Defaults to go1.x"
6772
default = "go1.x"

0 commit comments

Comments
 (0)