Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Commit 8e3d145

Browse files
committed
added source_code_hash to examples
1 parent 36c9cf2 commit 8e3d145

File tree

8 files changed

+60
-51
lines changed

8 files changed

+60
-51
lines changed

examples/example-with-cloudwatch-event/main.tf

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ provider "aws" {
33
}
44

55
module "lambda-scheduled" {
6-
source = "../../"
7-
description = "Example AWS Lambda using go with cloudwatch scheduled event trigger"
8-
filename = "${path.module}/test_function.zip"
9-
function_name = "tf-example-go-basic"
10-
handler = "example-lambda-func"
11-
runtime = "go1.x"
6+
source = "../../"
7+
description = "Example AWS Lambda using go with cloudwatch scheduled event trigger"
8+
filename = "${path.module}/test_function.zip"
9+
function_name = "tf-example-go-basic"
10+
handler = "example-lambda-func"
11+
runtime = "go1.x"
12+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
1213

1314
event = {
1415
type = "cloudwatch-event"
@@ -17,12 +18,13 @@ module "lambda-scheduled" {
1718
}
1819

1920
module "lambda-pattern" {
20-
source = "../../"
21-
description = "Example AWS Lambda using go with cloudwatch event pattern trigger"
22-
filename = "${path.module}/test_function.zip"
23-
function_name = "tf-example-go-basic"
24-
handler = "example-lambda-func"
25-
runtime = "go1.x"
21+
source = "../../"
22+
description = "Example AWS Lambda using go with cloudwatch event pattern trigger"
23+
filename = "${path.module}/test_function.zip"
24+
function_name = "tf-example-go-basic"
25+
handler = "example-lambda-func"
26+
runtime = "go1.x"
27+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
2628

2729
event = {
2830
type = "cloudwatch-event"

examples/example-with-dynamodb-event/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ provider "aws" {
33
}
44

55
module "lambda" {
6-
source = "../../"
7-
filename = "${path.module}/test_function.zip"
8-
function_name = "my-function"
9-
handler = "my-handler"
10-
runtime = "go1.x"
6+
source = "../../"
7+
filename = "${path.module}/test_function.zip"
8+
function_name = "my-function"
9+
handler = "my-handler"
10+
runtime = "go1.x"
11+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
1112

1213
event = {
1314
type = "dynamodb"

examples/example-with-kinesis-event/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ provider "aws" {
33
}
44

55
module "lambda" {
6-
source = "../../"
7-
filename = "${path.module}/test_function.zip"
8-
function_name = "my-function"
9-
handler = "my-handler"
10-
runtime = "go1.x"
6+
source = "../../"
7+
filename = "${path.module}/test_function.zip"
8+
function_name = "my-function"
9+
handler = "my-handler"
10+
runtime = "go1.x"
11+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
1112

1213
event = {
1314
type = "kinesis"

examples/example-with-s3-event/main.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ resource "aws_s3_bucket_notification" "bucket_notification" {
1212
}
1313

1414
module "lambda" {
15-
source = "../../"
16-
description = "Example AWS Lambda using go with S3 trigger"
17-
filename = "${path.module}/test_function.zip"
18-
function_name = "tf-example-go-s3"
19-
handler = "example-lambda-func"
20-
runtime = "go1.x"
15+
source = "../../"
16+
description = "Example AWS Lambda using go with S3 trigger"
17+
filename = "${path.module}/test_function.zip"
18+
function_name = "tf-example-go-s3"
19+
handler = "example-lambda-func"
20+
runtime = "go1.x"
21+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
2122

2223
event = {
2324
type = "s3"

examples/example-with-sns-event/main.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ provider "aws" {
33
}
44

55
module "lambda" {
6-
source = "../../"
7-
description = "Example AWS Lambda using go with sns trigger"
8-
filename = "${path.module}/test_function.zip"
9-
function_name = "tf-example-go-sns"
10-
handler = "example-lambda-func"
11-
runtime = "go1.x"
6+
source = "../../"
7+
description = "Example AWS Lambda using go with sns trigger"
8+
filename = "${path.module}/test_function.zip"
9+
function_name = "tf-example-go-sns"
10+
handler = "example-lambda-func"
11+
runtime = "go1.x"
12+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
1213

1314
event = {
1415
type = "sns"

examples/example-with-sqs-event/main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ provider "aws" {
33
}
44

55
module "lambda" {
6-
source = "../../"
7-
filename = "${path.module}/test_function.zip"
8-
function_name = "my-function"
9-
handler = "my-handler"
10-
runtime = "go1.x"
6+
source = "../../"
7+
filename = "${path.module}/test_function.zip"
8+
function_name = "my-function"
9+
handler = "my-handler"
10+
runtime = "go1.x"
11+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
1112

1213
event = {
1314
type = "sqs"

examples/example-with-vpc/main.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ provider "aws" {
33
}
44

55
module "lambda" {
6-
source = "../../"
7-
description = "Example AWS Lambda inside a VPC using go with cloudwatch scheduled event trigger"
8-
filename = "${path.module}/test_function.zip"
9-
function_name = "tf-example-go-basic-vpc"
10-
handler = "example-lambda-func"
11-
runtime = "go1.x"
6+
source = "../../"
7+
description = "Example AWS Lambda inside a VPC using go with cloudwatch scheduled event trigger"
8+
filename = "${path.module}/test_function.zip"
9+
function_name = "tf-example-go-basic-vpc"
10+
handler = "example-lambda-func"
11+
runtime = "go1.x"
12+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
1213

1314
vpc_config = {
1415
subnet_ids = ["subnet-123456", "subnet-123457"]

examples/example-without-event/main.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ provider "aws" {
33
}
44

55
module "lambda" {
6-
source = "../../"
7-
description = "Example AWS Lambda using go with cloudwatch scheduled event trigger"
8-
filename = "${path.module}/test_function.zip"
9-
function_name = "tf-example-go-basic"
10-
handler = "example-lambda-func"
11-
runtime = "go1.x"
6+
source = "../../"
7+
description = "Example AWS Lambda using go with cloudwatch scheduled event trigger"
8+
filename = "${path.module}/test_function.zip"
9+
function_name = "tf-example-go-basic"
10+
handler = "example-lambda-func"
11+
runtime = "go1.x"
12+
source_code_hash = filebase64sha256("${path.module}/test_function.zip")
1213
}

0 commit comments

Comments
 (0)