Skip to content

Commit 5563f15

Browse files
committed
Switch default archive directory to path.module
1 parent b573d14 commit 5563f15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

archive.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resource "random_uuid" "archive_name" {
1515
locals {
1616
archive_needed = var.source_directory != null || var.unzipped_source_file != null
1717
output_default_filename = local.archive_needed && var.archive_output_name == null ? "${basename(var.source_directory != null ? var.source_directory : var.unzipped_source_file)}-${random_uuid.archive_name[0].result}.zip" : null
18-
archive_output_directory = trimsuffix(trimsuffix(var.archive_output_directory != null ? var.archive_output_directory : path.root, "/"), "\\")
18+
archive_output_directory = trimsuffix(trimsuffix(var.archive_output_directory != null ? var.archive_output_directory : path.module, "/"), "\\")
1919
output_fullpath = local.archive_needed ? "${local.archive_output_directory}/${var.archive_output_name != null ? var.archive_output_name : local.output_default_filename}" : null
2020
// The name of the file for the Lambda resource to upload
2121
lambda_filename = local.archive_needed ? local.output_fullpath : var.lambda_config.filename

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ variable "unzipped_source_file" {
6565
}
6666

6767
variable "archive_output_directory" {
68-
description = "The directory where the Lambda archive should be saved. Only applies if the `source_directory` or `unzipped_source_file` variable is provided. Defaults to saving in the `path.root` directory."
68+
description = "The directory where the Lambda archive should be saved. Only applies if the `source_directory` or `unzipped_source_file` variable is provided. Defaults to saving in the `path.module` directory (the path of this installed module)."
6969
type = string
7070
default = null
7171
}

0 commit comments

Comments
 (0)