From 3159df3b1da44fcb0ecb34f63c3e9003f3c18c24 Mon Sep 17 00:00:00 2001 From: "patrick.herrera" Date: Mon, 7 Nov 2022 19:39:12 +1100 Subject: [PATCH 1/2] fix: Better support parallel execution by allowing wget to skip files if they exist rather than fail --- infra/terraform/modules/_lambda/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/terraform/modules/_lambda/main.tf b/infra/terraform/modules/_lambda/main.tf index b4b5823..08ae589 100644 --- a/infra/terraform/modules/_lambda/main.tf +++ b/infra/terraform/modules/_lambda/main.tf @@ -10,7 +10,7 @@ resource "null_resource" "download" { } provisioner "local-exec" { - command = "test -f ${local.package_directory}/${local.package_filename} || (mkdir -p ${local.package_directory} && wget -P ${local.package_directory} ${var.package_url})" + command = "test -f ${local.package_directory}/${local.package_filename} || (mkdir -p ${local.package_directory} && wget --no-clobber -P ${local.package_directory} ${var.package_url})" } } From 0534df19938689e98db3e7112c602a64ffea716a Mon Sep 17 00:00:00 2001 From: Patrick Herrera <3760858+patrickherrera@users.noreply.github.com> Date: Tue, 15 Nov 2022 10:27:38 +1100 Subject: [PATCH 2/2] Don't check for existing file and always get latest --- infra/terraform/modules/_lambda/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/terraform/modules/_lambda/main.tf b/infra/terraform/modules/_lambda/main.tf index 08ae589..9493b48 100644 --- a/infra/terraform/modules/_lambda/main.tf +++ b/infra/terraform/modules/_lambda/main.tf @@ -10,7 +10,7 @@ resource "null_resource" "download" { } provisioner "local-exec" { - command = "test -f ${local.package_directory}/${local.package_filename} || (mkdir -p ${local.package_directory} && wget --no-clobber -P ${local.package_directory} ${var.package_url})" + command = "mkdir -p ${local.package_directory} && wget --no-clobber -P ${local.package_directory} ${var.package_url}" } }