-
Notifications
You must be signed in to change notification settings - Fork 628
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
metadata_options → http_tokens = "required" is NOT a safe assumption. #1373
Comments
Thanks for creating the issue, any interest to propose a fix in a PR? |
A warning to those who update, realise that http_tokens are now required, then try to rollback: Terraform will NOT delete metadata option from your launch configurations. You will need to manually edit all of your launch configurations to remove this setting, or delete them and have terraform remake them. |
What would be the best way forward? Removing the option for the moment and do the implementation in a new PR? |
That would be my suggestion. It would be fairly simple to make the option configurable and have it false by default? Edit: The v2 metadata service will still work even if it isn't force-enabled, I believe |
Drawback of setting the option to false is that the default provided user_data script is not working anymore, am I correct? |
I don't think so, I believe it should still work, as the recommended path for upgrading implies that IMDSv2 is still usable even if it isn't explicitly required by metadata options. Unless there's a |
I will create a PR to make the feature configurable, and set the default to optional |
@Makeshift @skyzyx I have created a fix, feel free to make comments on the PR (#1377) |
This is not a safe assumption to make:
https://github.com/philips-labs/terraform-aws-github-runner/blob/develop/modules/runners/main.tf#L62
For example, we have Base AMIs where certain actions are performed early (as part of
/etc/rc.local
) which make calls to the IDMS service. Force-requiring a token means that the nodes boot up incorrectly, and never get around to processing theuser_data
where we connect to Actions.This should either be configurable, or you need to explicitly point out how this may affect people using the on-board IDMS service, so that they can pre-bake their AMIs with this in-mind. Users need to perform a step to explicitly fetch a token, then include that token in all additional curl calls to
169.254.169.254
.https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
The text was updated successfully, but these errors were encountered: