Skip to content

Commit 951c5bb

Browse files
Add local_file_dir var for controlling where the zip file is written (#17)
1 parent 130a807 commit 951c5bb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
data "archive_file" "zip_file_for_lambda" {
1010
type = "zip"
11-
output_path = "${var.name}.zip"
11+
output_path = "${var.local_file_dir}/${var.name}.zip"
1212

1313
dynamic "source" {
1414
for_each = distinct(flatten([

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ variable file_globs {
2626
description = "list of files or globs that you want included from the lambda_code_source_dir"
2727
}
2828

29+
variable local_file_dir {
30+
description = "A path to the directory to store plan time generated local files"
31+
default = "."
32+
}
33+
2934
variable runtime {
3035
description = "The runtime of the lambda function"
3136
default = "nodejs10.x"

0 commit comments

Comments
 (0)