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

feat: Allow ignoring changes in image_uri #552

Conversation

atorrescogollo
Copy link

@atorrescogollo atorrescogollo commented Mar 25, 2024

Description

Allow to a rollout the image_uri (from a different place, e.g: Jenkins, GitHub Actions, etc) without requiring you to update the terraform code.

Unfortunately, I don't think there is a way to parametrize the ignore_changes field. Though, I wrote a feature request to opentofu to try to address this:

Motivation and Context

I want to create the lambda so that it targets to latest tag by default and I have always something that runs. However, when I make a change that only concerns to the code, I don't need to run terraform (which has all the dependencies for the lambda). I just want to change the image_uri to target the newly created image (even with aws-cli).

Breaking Changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@antonbabenko
Copy link
Member

I understand this PR's reasoning but don't like the code duplication because it significantly increases the maintenance cost.

Unfortunately, I don't see a way to merge this as-is. I suggest that you deploy as you do and change the value via Terraform configuration to avoid the revert.

@atorrescogollo
Copy link
Author

Ok, I understand. I uploaded this PR because I saw the same issue in the secrets-manager module: https://github.com/terraform-aws-modules/terraform-aws-secrets-manager/blob/v1.1.2/main.tf#L92-L116 . But I get that here is way more maintenance. I think I'll have to maintain it in my fork.

Then, we'll see if eventually this can be an opentofu feature instead. I post the issue link in case someone wants to support this feature by putting a 👍 in the opentofu issue :

atorrescogollo added a commit to too-good-to-go/terraform-aws-lambda that referenced this pull request Apr 3, 2024
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants