-
-
Notifications
You must be signed in to change notification settings - Fork 713
feat: Add support for separate deployments of infra and code #175
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
Conversation
* add ignore_changes_package (source code hash) var * update CHANGELOG
* add ignore_changes_package (source code hash) var * update CHANGELOG * ignore_source_code_hash
This change would be useful for us as well. |
We have tested it and its works us expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can deploy any package using local_existing_package
argument and then update
it and run terraform apply
again to redeploy it.
See this:
terraform-aws-lambda/examples/complete/main.tf
Lines 276 to 277 in afbf7bd
create_package = false | |
local_existing_package = "${path.module}/../fixtures/python3.8-zip/existing_package.zip" |
There is no need for extra work unless I am missing something important.
G'day Anton, love your work. You've contributed a massive amount to Terraform and its uptake. Thank you! The purpose of this update is for Terraform not to manage the deployed code but only the lambda resource and associated attributes, triggers, etc. This update allows another group (e.g. pure developers) to publish the lambda code package on their own schedule and via a separate pipeline i.e. not through I don't believe the module currently supports this type of infrastructure vs code behaviour? |
@anoshi 👍 Thanks for the explanation - I now understand the use case! :) Let me finish this PR a bit and extend it to work with Lambda Layers also. |
Thanks for the PR! v2.10.0 has been just released. |
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
Ignores changes to the source code hash of the lambda function code to maintain an idempotent terraform build in cases where the application code (lambda package) deployment is managed by an external pipeline / party.
Because the content of
lifecycle
ignore_changes
lists cannot be dynamically generated, this update simply sets theaws_lambda_function
's optional argumentsource_code_hash
tonull
if the new variableignore_source_code_hash
is set totrue
.Motivation and Context
Allow terraform to manage infrastructure components and application developers to manage the application code
Breaking Changes
none
How Has This Been Tested?
ignore_source_code_hash
variable specified / set totrue