Skip to content

Commit

Permalink
Change the lambda source path
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhughes committed Mar 19, 2019
1 parent 80d6768 commit d3c745b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
8 changes: 0 additions & 8 deletions codebuild/main.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
provider "aws" {
region = "${var.aws_region}"
}

terraform {
backend "s3" {}
}

resource "aws_codebuild_project" "build_project" {
name = "${var.build_name}"
description = "${var.build_description}"
Expand Down
17 changes: 8 additions & 9 deletions lambda/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
provider "aws" {
region = "${var.aws_region}"
}

terraform {
backend "s3" {}
}

resource "aws_lambda_function" "base_lambda" {
function_name = "${var.function_name}"
handler = "${var.function_handler}"
role = "${aws_iam_role.lambda_iam_role.arn}"
runtime = "${var.function_runtime}"
filename = "${var.function_filename}"
filename = "${path.module}/bootstrap.zip"
source_code_hash = "${base64sha256(file("${path.module}/bootstrap.zip"))}"

lifecycle {
ignore_changes = [
"filename"
]
}
}
6 changes: 0 additions & 6 deletions lambda/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,4 @@ variable "function_runtime" {
variable "function_handler" {
description = "Path to the handler function"
type = "string"
}

variable "function_filename" {
description = "Path to the handler function"
type = "string"
default = "bootstrap.zip"
}

0 comments on commit d3c745b

Please sign in to comment.