Skip to content

Commit c9279ee

Browse files
committed
CCM-11751: Fixing eventpub path
1 parent c287160 commit c9279ee

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

infrastructure/modules/eventpub/archive_file_lambda.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
resource "archive_file" "lambda" {
22
type = "zip"
3-
source_dir = "${path.root}/.terraform/modules/eventpub/lambda/eventpub/src"
3+
source_dir = var.source_path
44

55
# Timestamp in path to resolve https://github.com/hashicorp/terraform-provider-archive/issues/39
6-
output_path = "${path.root}/.terraform/modules/eventpub/lambda/eventpub_${timestamp()}.zip"
6+
output_path = var.output_path
77
excludes = [
88
# NodeJS Exclusions
99
"**/__tests__",

infrastructure/modules/eventpub/variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,13 @@ variable "force_destroy" {
123123
description = "When enabled will force destroy event-cache S3 bucket"
124124
default = false
125125
}
126+
127+
variable "source_path" {
128+
type = string
129+
description = "Path to the source code for the lambda function"
130+
}
131+
132+
variable "output_path" {
133+
type = string
134+
description = "Path to output the zipped lambda function"
135+
}

0 commit comments

Comments
 (0)