From 9c41ce8d6133d9ec19e00e32543ccd84e003b177 Mon Sep 17 00:00:00 2001 From: Brian Ojeda <9335829+sgtoj@users.noreply.github.com> Date: Thu, 28 May 2026 10:28:45 -0400 Subject: [PATCH] fix: remove source_code_hash and close artifact-packager ref issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the source_code_hash argument from aws_lambda_function.this to prevent terraform plan failures when the artifact zip does not yet exist (e.g. CI environments without Docker). The filename attribute alone is sufficient — Terraform detects content changes at apply time. The artifact-packager ref was already updated to v1.4.1 in a prior commit, which resolved the forced-rebuild race condition. Closes #4 Closes #6 --- main.tf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 101f3fb..89d063a 100644 --- a/main.tf +++ b/main.tf @@ -98,8 +98,7 @@ resource "aws_lambda_function" "this" { reserved_concurrent_executions = var.lambda_config.reserved_concurrent_executions architectures = [var.lambda_config.architecture] - filename = module.bot_artifact[0].artifact_package_path - source_code_hash = filebase64sha256(module.bot_artifact[0].artifact_package_path) + filename = module.bot_artifact[0].artifact_package_path environment { variables = local.lambda_environment