Skip to content

Commit 221aeff

Browse files
Merge pull request #2 from codygreen/master
close issue 1
2 parents 2f2b563 + fc8984b commit 221aeff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Lambda function to handle CodePipeline CloudWatch events and send a notification
55
![Started](docs/sample-notification-succeeded.png)
66

77
### Deployment
8-
Requires Terraform to be installed.
8+
Requires Terraform 0.12+ to be installed.
99

1010
1. Change permissions of deployment bash script `chmod +x deploy.sh`
1111
2. Run `./deploy.sh` which will prompt you for the following variables:

terraform/lambda.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resource "aws_lambda_function" "lambda" {
33
function_name = "codepipeline-teams-notifications"
44
role = "${aws_iam_role.lambda.arn}"
55
handler = "index.handler"
6-
source_code_hash = "${base64sha256(file("../lambda.zip"))}"
6+
source_code_hash = "${filebase64sha256("../lambda.zip")}
77
runtime = "nodejs8.10"
88
timeout = 20
99
@@ -15,9 +15,9 @@ resource "aws_lambda_function" "lambda" {
1515
}
1616
1717
resource "aws_lambda_permission" "cloudwatch_execution" {
18-
statement_id = "AllowExecutionFromCloudWatch"
19-
action = "lambda:InvokeFunction"
20-
function_name = "${aws_lambda_function.lambda.function_name}"
21-
principal = "events.amazonaws.com"
22-
source_arn = "${aws_cloudwatch_event_rule.codepipeline_event.arn}"
18+
statement_id = "AllowExecutionFromCloudWatch"
19+
action = "lambda:InvokeFunction"
20+
function_name = "${aws_lambda_function.lambda.function_name}"
21+
principal = "events.amazonaws.com"
22+
source_arn = "${aws_cloudwatch_event_rule.codepipeline_event.arn}"
2323
}

0 commit comments

Comments
 (0)