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 · 4 comments

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.

Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Feb 22, 2025
@jgalliers
Copy link

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

@github-actions github-actions bot removed the stale label Mar 4, 2025
@johnecapps
Copy link

johnecapps commented Mar 26, 2025

+1

I'll fork this for now and make my own edits since I'll never need to track the image_uri.

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

4 participants