-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
improvement: Removed dependency on external template provider #854
Conversation
Push logic from terraform down to the template. Makes the formatting slightly easier to follow
Updates to the eks_cluster now do not trigger recreation of launch configurations
Awesome ❤️! This will increase readability and consistency.
I'll prefer to have all locals into the
I think we can continue to use templatefile, it make the kubeconfig easily reusable between LT and LC. |
@max-rocket-internet any thought ? |
Looks amazing 💗 I'll test it |
@dpiddockcmp would you like to be a maintainer of this module? Your contributions have been outstanding and I am spending less time on this project these days. And I see you're already a member? I already asked you this some months back on a PR but perhaps you didn't see it 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick plan on 2 clusters and LGTM 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested twice and it's LGTM ❤️❤️❤️
@dpiddockcmp can you please remove template provider in example ? There are not needed anymore. Like https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/basic/main.tf#L22-L24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging. I'll open another PR to remove template in examples.
Oops, I had a couple busy days and was going to do the requested changes today. Thanks for sorting it out.
This change wasn't done either before merging
I think you're thinking of the userdata 🙂 . Generated kubeconfig is only useful for end users now.
@max-rocket-internet I must have missed that. Sure, I'll be a maintainer 😄 |
PR to update examples #863 |
Oops. I'll move them in #865 |
Done 🚀 |
…ider (terraform-aws-modules#854)" This part reverts commit b183b97. :sob:
Broke use case of passing in custom template content. Reverts most of the following PRs: - terraform-aws-modules#865 - terraform-aws-modules#863 - terraform-aws-modules#854
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. |
PR o'clock
Description
Removed dependency on the external template provider and instead used the Terraform native
templatefile()
function. As recommended by the provider itself.My primary goal was to stop unnecessary recreation of worker launch templates and configurations when certain other resources are modified, for example the
aws_eks_cluster
. For example, changing the IP whitelist on the cluster public endpoint should not impact worker nodes. Previously:data_template_file
userdatas could not be refreshed and so were in an unknown state during Plan stageThought I'd go the full mile and also convert kubeconfig. I moved some of the logic into the template itself to make the terraform easier to read.
Questions for maintainers
locals.tf
orworkers.tf
/workers_launch_template.tf
? I don't think they should remain indata.tf
even if it makes history a little harder to follow.yamlencode
, like in aws-auth, instead of a template? It will make the locals messy again but the output YAML should always be valid.Checklist