Closed Octogonapus closed 8 months ago
I don't understand what was the exact problem your PR should fix. Please provide the 100% failing case (code + steps), so that I can verify it.
As of now, I am 99.9% sure that this PR is not necessary.
Related to #396 (probably).
you are right this can be solved another way
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
This PR adds a
source_code_hash
variable which overrides the computed hash using a user-supplied value.Motivation and Context
This change is needed when you are using a lambda zip which is created by Terraform. Terraform's plan will pick up the hash from an existing zip file. If the zip file is recreated at apply time, the hash will change and the plan will become inconsistent, leading to an error like this:
There are lots of issues in the AWS provider like this but I'm not sure if they are caused by this exact use case so I won't link them here.
Breaking Changes
No breaking changes; the source code hash is still computed by default.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull requestI tested this in my own project.