fix: remove source_code_hash to prevent plan failures; close artifact-packager ref issue#8
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves two related issues caused by the artifact-packager integration:
Issue #4 — Update artifact-packager ref
The module ref was already bumped to
v1.4.1in commit 820e497, which includes the upstream fix for thecoalesce(var.force_rebuild_id, timestamp())forced-rebuild bug (cruxstack/terraform-docker-artifact-packager#7). This PR formally closes the issue.Issue #6 — Remove
source_code_hashRemoves the
source_code_hash = filebase64sha256(...)argument fromaws_lambda_function.this. This function requires the file to exist at plan time, which fails in CI environments where Docker is unavailable and the artifact zip is never built. Thefilenameattribute alone is sufficient — Terraform detects content changes at apply time.Closes #4
Closes #6