-
-
Notifications
You must be signed in to change notification settings - Fork 715
Ability to ignore changes to image_uri when function updates are performed outside of Terraform #652
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
Comments
Would also love this. |
This issue has been automatically marked as stale because it has been open 30 days |
Commenting here to remove stale, this is absolutely a requirement for our use case also. We need to initialise the "shell" of the lambda using Terraform but then use a separate CI/CD process to actually build and release the referenced container |
+1 I'll fork this for now and make my own edits since I'll never need to track the image_uri. |
+1 |
+1, this would be very helpful! |
This issue has been automatically marked as stale because it has been open 30 days |
Not stale, also looking for solution to this. |
Uh oh!
There was an error while loading. Please reload this page.
Is your request related to a new offering from AWS?
No
Is your request related to a problem? Please describe.
When managing docker/ECR based lambda deployments outside of Terraform (e.g. through CI/CD using the AWS CLI
aws lambda update-function-code --image-uri ...
) it would be good to have the ability to ignoreimage_uri
.This would enable consumers to continue making changes to function configuration and IAM policy etc using Terraform but continously deploy new image versions to the function via CI/CD.
Describe the solution you'd like.
Support a new boolean variable to ignore changes to
image_uri
e.g.ignore_image_uri
. Similar to theignore_source_code_hash
variable used for ignoring changes to zip based functions. Due to the frustrating limitation of not being able to conditionally define lifecycleignore_changes
, this would likely need to be two lambda resource blocks - one with, one without the ignore.Describe alternatives you've considered.
No known alternative,
ignore_source_code_hash
does not ignore changes toimage_uri
.Additional context
A workflow I use to manage Lambda functions is to initially provision functions using Terraform with a placeholder image held in ECR and then setup CI/CD to iterate the docker image version. When changes to IAM policy or concurrency are made in Terraform there is unwanted drift detected with
image_uri
.The text was updated successfully, but these errors were encountered: