Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Nisenson committed Feb 19, 2022
1 parent 0f04567 commit 4685786
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ provider "aws" {
data "archive_file" "zip_file_for_lambda" {
type = "zip"
output_file_mode = "0666"
output_path = "${var.local_file_dir}/${var.name}.zip"
output_path = "${var.local_file_dir}/${var.name}-${random_string.r.result}.zip"

dynamic "source" {
for_each = distinct(flatten([
Expand All @@ -40,15 +40,13 @@ data "archive_file" "zip_file_for_lambda" {
}

depends_on = [
# Make sure archive is created in apply stage
null_resource.dummy_trigger
random_string.r
]
}

resource "null_resource" "dummy_trigger" {
triggers = {
timestamp = timestamp()
}
resource "random_string" "r" {
length = 16
special = false
}

/**
Expand Down

0 comments on commit 4685786

Please sign in to comment.