-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Add add metadata options to managed node groups launch template #1562
feat: Add add metadata options to managed node groups launch template #1562
Conversation
@@ -63,6 +63,12 @@ resource "aws_launch_template" "workers" { | |||
]) | |||
} | |||
|
|||
metadata_options { | |||
http_endpoint = lookup(each.value, "metadata_http_endpoint", "enabled") |
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.
Let's generate metadata_options
using dynamic
and create it only if one of 3 inputs are present. Exactly as here - https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/master/main.tf#L92-L99
looks that it is duplicating #1485 |
1 similar comment
looks that it is duplicating #1485 |
@antonbabenko |
@xr0n1ck If you can verify it and apply the changes to that PR, it would be great. |
@antonbabenko |
I understand, let's make a PR based on that one into this repository that will close #1485 |
Hello! I have rebased #1485 |
hi @maxbrunet / @xr0n1ck - whichever PR we go with, can we just copy what we have for the autoscaling group module https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/d4b7da041ef781604726953234b5bcd494cc5908/main.tf#L92-L99 you should be able to copy that block, and its variable and paste them in your PRs |
@bryantbiggs I copied what was already done in this module, I was thinking to be consistent with that: terraform-aws-eks/workers_launch_template.tf Lines 385 to 401 in c2bd137
Lines 268 to 284 in c2bd137
Also in the autoscaling module you shared, defaults being http_endpoint = lookup(metadata_options.value, "http_endpoint", null)
|
I'm confused, what you said is inconsistent is what you have in your PR https://github.com/terraform-aws-modules/terraform-aws-eks/pull/1485/files#diff-1044253a991537ca26fb2e4d8ffd2689492a98061b0c1cada5531a90516fae71R79 |
I apply the defaults here https://github.com/terraform-aws-modules/terraform-aws-eks/pull/1485/files#diff-98193ca5efaaf91be09ba7fc2c847ee1d2df56aa4e9d3691b7fa4e5fffc318edR29-R31 So in code, it is consistent with how the node_groups module applies defaults, and the behaviour is consistent with the self-managed workers |
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
Please explain the changes you made here and link to any relevant issues.
Checklist