Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow sourcecode hash also for s3 #66

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

jverhoeks
Copy link
Contributor

By default the sourcecode_hash is used for local file deployments.
But in some cases we want to update the lambda from terraform when using S3 files. This is supported by the sourcecode_hash

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function#source_code_hash

When using this with s3_bucket and s3_key the module behaves as following:

source_code_hash = null -> no deployment when s3 file changes (previous behaviour)
source_code_hash = s3object.etag -> terraform will update function

Updated the Pre-commit to current versions and allow for no aws keys

@github-actions github-actions bot added the bug Something isn't working label Nov 15, 2023
Copy link
Contributor

github-actions bot commented Nov 15, 2023

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Lint 📖success

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


@jverhoeks jverhoeks changed the title Fix: Allow sourcecode hash only for s3 fix: Allow sourcecode hash only for s3 Nov 15, 2023
tmoreau-sbp
tmoreau-sbp previously approved these changes Nov 15, 2023
Copy link
Contributor

@tmoreau-sbp tmoreau-sbp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jverhoeks jverhoeks changed the title fix: Allow sourcecode hash only for s3 fix: Allow sourcecode hash also for s3 Nov 16, 2023
@jverhoeks jverhoeks merged commit 97b6cdc into master Nov 16, 2023
@jverhoeks jverhoeks deleted the allow_sourcecode_hash_for_s3 branch November 16, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants