Skip to content

Commit 7fdd0be

Browse files
CCM-12059: Improve Eventpub Lambda Build
1 parent 0a6f3cc commit 7fdd0be

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
resource "archive_file" "lambda" {
2-
type = "zip"
3-
source_dir = "${path.module}/../../../lambda/eventpub/src"
1+
data "archive_file" "lambda" {
2+
type = "zip"
3+
source_dir = "${path.module}/../../../lambda/eventpub/src"
4+
output_path = "${path.module}/../../../lambda/${local.csi}_eventpub.zip"
45

5-
# Timestamp in path to resolve https://github.com/hashicorp/terraform-provider-archive/issues/39
6-
output_path = "${path.module}/../../../lambda/eventpub_${timestamp()}.zip"
76
excludes = [
87
# NodeJS Exclusions
98
"**/__tests__",
109
"**/node_modules",
1110
"**/package.json",
1211
"**/package-lock.json",
1312
]
13+
14+
depends_on = [null_resource.force_archive]
1415
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
resource "null_resource" "force_archive" {
2+
triggers = {
3+
always_run = timestamp()
4+
}
5+
6+
provisioner "local-exec" {
7+
command = "true"
8+
}
9+
}

0 commit comments

Comments
 (0)