Skip to content

Commit

Permalink
feat(lambda): added layer_qualified_arns input
Browse files Browse the repository at this point in the history
  • Loading branch information
mskrajnowski committed Mar 7, 2021
1 parent 8ce8232 commit 3a23b43
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Creates an AWS Lambda function
| Provider | Requirements |
|-|-|
| terraform | `>= 0.12` |
| `archive` | `>= 1.2.2` |
| `aws` | `>= 2.40.0` |

## Inputs
Expand Down Expand Up @@ -46,6 +45,10 @@ Creates an AWS Lambda function

Path to the event handler

* `layer_qualified_arns` (`list(string)`, default: `[]`)

Lambda layers to include

* `memory_size` (`number`, default: `128`)

Amount of memory in MB your Lambda Function can use at runtime
Expand Down
1 change: 1 addition & 0 deletions lambda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ resource "aws_lambda_function" "lambda" {

function_name = var.name
filename = module.package.output_path
layers = var.layer_qualified_arns
handler = var.handler
runtime = var.runtime
publish = true
Expand Down
6 changes: 6 additions & 0 deletions lambda/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ variable "environment_variables" {
type = map(string)
default = {}
}

variable "layer_qualified_arns" {
description = "Lambda layers to include"
type = list(string)
default = []
}
3 changes: 1 addition & 2 deletions lambda/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ terraform {
required_version = ">= 0.12"

required_providers {
archive = ">= 1.2.2"
aws = ">= 2.40.0"
aws = ">= 2.40.0"
}
}

0 comments on commit 3a23b43

Please sign in to comment.