Skip to content

Commit 49fc2b8

Browse files
authored
Merge branch 'master' into vpc-optional
2 parents 27a54dd + 6c72f7a commit 49fc2b8

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ module "lambda_api" {
4040
role_permissions_boundary_arn = module.acs.role_permissions_boundary.arn
4141
codedeploy_test_listener_port = 4443
4242
use_codedeploy = true
43+
timeout = 3
44+
memory_size = 128
4345
4446
lambda_vpc_config = {
4547
subnet_ids = module.acs.private_subnet_ids
@@ -96,6 +98,8 @@ module "lambda_api" {
9698
| log_retention_in_days | number | CloudWatch log group retention in days. Defaults to 7. | 7
9799
| lambda_policies | list(string) | List of IAM Policy ARNs to attach to the lambda role. | []'
98100
| use_codedeploy | bool | If true, CodeDeploy App and Deployment Group will be created and TF will not update alias to point to new versions of the Lambda (becuase CodeDeploy will do that). | false
101+
| timeout | number | How long the lambda will run (in seconds) before timing out | 3 (same as terraform default)
102+
| memory_size | number | Size of the memory of the lambda. CPU will scale along with it | 128 (same as terraform default)
99103

100104
#### lambda_vpc_config
101105

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ resource "aws_lambda_function" "api_lambda" {
248248
handler = var.handler
249249
runtime = var.runtime
250250
publish = true
251+
timeout = var.timeout
252+
memory_size = var.memory_size
251253

252254
dynamic "environment" {
253255
for_each = var.environment_variables != null ? [1] : []

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,16 @@ variable "use_codedeploy" {
108108
type = bool
109109
description = "If true, CodeDeploy App and Deployment Group will be created and TF will not update alias to point to new versions of the Lambda (becuase CodeDeploy will do that)."
110110
default = false
111+
}
112+
113+
variable "timeout" {
114+
type = number
115+
description = "Timeout (in seconds) for lambda. Defaults to 3 (terraform default"
116+
default = 3
117+
}
118+
119+
variable "memory_size" {
120+
type = number
121+
description = "Memory Size of the lambda"
122+
default = 128
111123
}

0 commit comments

Comments
 (0)