Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit ebcb1c1

Browse files
authored
Merge pull request #2 from bankrate/addLayersToLambda
add layers parameter to lambda module
2 parents bc57d17 + 8900599 commit ebcb1c1

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module "lambda" {
1212
timeout = var.timeout
1313
tags = var.tags
1414
vpc_config = var.vpc_config
15+
layers = var.layers
1516
}
1617

1718
module "event-cloudwatch-scheduled-event" {

modules/lambda/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ resource "aws_lambda_function" "lambda" {
1717
source_code_hash = filebase64sha256(var.filename)
1818
tags = var.tags
1919
timeout = var.timeout
20+
layers = var.layers
2021

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

modules/lambda/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ variable "vpc_config" {
6767
default = {}
6868
}
6969

70+
variable "layers" {
71+
description = "List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See [Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)"
72+
type = list(string)
73+
default = []
74+
}
75+

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,9 @@ variable "vpc_config" {
9393
type = map(list(string))
9494
default = {}
9595
}
96+
97+
variable "layers" {
98+
description = "List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See [Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)"
99+
type = list(string)
100+
default = []
101+
}

0 commit comments

Comments
 (0)