Description
Hello again :)
in our use case, started with locally building packages but quickly had to switch away from that to building zip packages via CI/CD of the Lambda stuff we want to deploy. Hence, we use the s3_existing_package variable to reference that built packages. However, we came across the issue that the package will not be redeployed, even if there are modifications to it. To solve this, the lambda resources offer the source_code_hash attribute that is intended to detect package changes and deploy if necessary. It would be great if there simply could be a variable that, if it is set, will be simply passed to respective layer and function resources. I would make a proposal as before but i do not completely understand the if statement composition and dont want to ruin something there. But basically it should be some kind of if statement at the top level like this:
source_code_hash = var.source_code_hash != "" ? var.source_code_hash : other_stuff_that_is_currently_in_the_statement
What do you say?
Many thanks