Skip to content

Commit

Permalink
Merge pull request #25 from codigube/support-lambda-layer
Browse files Browse the repository at this point in the history
Added support for adding lambda layers
  • Loading branch information
rickardl authored Mar 25, 2020
2 parents 5299443 + bd858fc commit e53abd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ resource "aws_lambda_function" "main" {
variables = var.environment
}

layers = var.layers

tags = merge(var.tags, { "Name" = var.name_prefix })
}

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ variable "publish" {
default = false
}

variable "layers" {
description = "A list of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function."
type = list(string)
default = []
}

variable "tags" {
description = "A map of tags (key-value pairs) passed to resources."
type = map(string)
Expand Down

0 comments on commit e53abd9

Please sign in to comment.