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

Ability to ignore changes to image_uri when function updates are performed outside of Terraform #652

Open
danielwhatmuff opened this issue Jan 2, 2025 · 1 comment

Comments

@danielwhatmuff
Copy link

danielwhatmuff commented Jan 2, 2025

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 ignore image_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 the ignore_source_code_hash variable used for ignoring changes to zip based functions. Due to the frustrating limitation of not being able to conditionally define lifecycle ignore_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 to image_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.

@StanDeeks
Copy link

Would also love this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants