File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,13 @@ module "assert_proper_output_archive_name" {
88}
99
1010// Create a UUID to be used for the output archive file name, so it doesn't clash with others
11- resource "random_uuid" "archive_name" {}
11+ resource "random_uuid" "archive_name" {
12+ count = local. archive_needed ? 1 : 0
13+ }
1214
1315locals {
1416 archive_needed = var. source_directory != null || var. unzipped_source_file != null
15- 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 . result } .zip" : null
17+ 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
1618 archive_output_directory = trimsuffix (trimsuffix (var. archive_output_directory != null ? var. archive_output_directory : path. root , " /" ), " \\ " )
1719 output_fullpath = local. archive_needed ? " ${ local . archive_output_directory } /${ var . archive_output_name != null ? var . archive_output_name : local . output_default_filename } " : null
1820 // The name of the file for the Lambda resource to upload
You can’t perform that action at this time.
0 commit comments