Skip to content

Commit 71f7de0

Browse files
CCM-10257: Implement Eventpub in Core
1 parent 1fd110d commit 71f7de0

3 files changed

Lines changed: 15 additions & 18 deletions

File tree

infrastructure/modules/eventpub/archive_file_lambda.tf

Lines changed: 0 additions & 16 deletions
This file was deleted.

infrastructure/modules/eventpub/lambda_function.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ resource "aws_lambda_function" "main" {
99
memory_size = 128
1010
timeout = 20
1111

12-
filename = archive_file.lambda.output_path
13-
source_code_hash = archive_file.lambda.output_base64sha256
12+
filename = "${path.module}/lambda/eventpub/eventpub.zip"
13+
source_code_hash = base64encode(filesha256("${path.module}/lambda/eventpub/eventpub.zip"))
1414

1515
logging_config {
1616
application_log_level = var.log_level
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
resource "null_resource" "lambda_zip" {
2+
provisioner "local-exec" {
3+
command = <<EOT
4+
cd "${path.module}/lambda/eventpub/src" && \
5+
zip -r ../eventpub.zip . \
6+
-x "**/__tests__/*" "**/node_modules/*" "**/package.json" "**/package-lock.json"
7+
EOT
8+
}
9+
10+
triggers = {
11+
always_run = timestamp()
12+
}
13+
}

0 commit comments

Comments
 (0)