Skip to content

Commit

Permalink
Merge pull request #14 from monckdav/cbm_lambda
Browse files Browse the repository at this point in the history
added source_code_hash parameter
  • Loading branch information
rickardl authored May 3, 2019
2 parents b9a8640 + ed21a4f commit 22fe794
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ resource "aws_lambda_function" "main_s3" {
timeout = "${var.timeout}"
role = "${aws_iam_role.main.arn}"
reserved_concurrent_executions = "${var.reserved_concurrent_executions}"
source_code_hash = "${var.source_code_hash}"

environment {
variables = "${var.environment}"
Expand All @@ -85,6 +86,7 @@ resource "aws_lambda_function" "vpc_s3" {
timeout = "${var.timeout}"
role = "${aws_iam_role.main.arn}"
reserved_concurrent_executions = "${var.reserved_concurrent_executions}"
source_code_hash = "${var.source_code_hash}"

vpc_config {
subnet_ids = ["${var.subnet_ids}"]
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,8 @@ variable "reserved_concurrent_executions" {
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"
default = -1
}

variable "source_code_hash" {
description = "Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3_key."
default = ""
}

0 comments on commit 22fe794

Please sign in to comment.