diff --git a/main.tf b/main.tf index b6bb318..d5f1187 100644 --- a/main.tf +++ b/main.tf @@ -8,7 +8,7 @@ */ data "archive_file" "zip_file_for_lambda" { type = "zip" - output_path = "${var.name}.zip" + output_path = "${var.local_file_dir}/${var.name}.zip" dynamic "source" { for_each = distinct(flatten([ diff --git a/variables.tf b/variables.tf index 73aa8b3..f2f7bde 100644 --- a/variables.tf +++ b/variables.tf @@ -26,6 +26,11 @@ variable file_globs { description = "list of files or globs that you want included from the lambda_code_source_dir" } +variable local_file_dir { + description = "A path to the directory to store plan time generated local files" + default = "." +} + variable runtime { description = "The runtime of the lambda function" default = "nodejs10.x"