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

Add "lifecycle" key in terraform module #114

Open
ariault-blanchard opened this issue Feb 9, 2024 · 3 comments
Open

Add "lifecycle" key in terraform module #114

ariault-blanchard opened this issue Feb 9, 2024 · 3 comments

Comments

@ariault-blanchard
Copy link

Hello,

Can you add "lifecycle" key in the module to let people use "ignore_changes" with terraform ?

If we want to use it with GKE Autopilot, everytime we are running a plan / apply, it want to change custom metadata added by Autopilot... We could avoid that with "lifecycle" :)

  lifecycle {
    ignore_changes = []
  }

Thank you for creating this module, it resolves a lot of headaches !

@rosmo
Copy link
Collaborator

rosmo commented Feb 9, 2024

While it may work, I'm not so sure that that's entirely correct... It's a bit of a gap in Terraform modules in general that you cannot inject lifecycle attributes (as they can't refer to variables etc). If it does what I think it does (ignoring all updates), it would make making changes in the future quite a bit harder. Could you consider forking the Terraform part of it?

@ariault-blanchard
Copy link
Author

Hello !

You can just create the entry and leave it empty so it can be overwrite, that was my first idea.

I'll try to work on it.

@rosmo
Copy link
Collaborator

rosmo commented Apr 17, 2024

I don't think that is unfortunately possible. You might want to look into Helm deployment option that is available now, which should get you rid of the annotation spam.

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