Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ node_modules
.terraform
lambda.zip

terraform/terraform.tfstate
terraform/terraform.tfstate.backup
3 changes: 2 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash -e

zip -FSr lambda.zip * -x terraform -x docs
zip -FSr lambda.zip index.js *.json functions/ node_modules/
npm install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor change - let's change the order of these two lines. We want to install our libraries and then zip them.

cd terraform
terraform apply
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion terraform/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "aws_lambda_function" "lambda" {
function_name = "codepipeline-teams-notifications"
role = "${aws_iam_role.lambda.arn}"
handler = "index.handler"
source_code_hash = "${filebase64sha256("../lambda.zip")}
source_code_hash = "${filebase64sha256("../lambda.zip")}"
runtime = "nodejs8.10"
timeout = 20

Expand Down