-
Notifications
You must be signed in to change notification settings - Fork 4k
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
EC2 Instance requireImdsv2 fix #32887
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing |
It may be possible we also want The launchTemplate based code didn't include this, so I skipped too. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This is draft PR at the moment because I'm still testing. |
Because of aws-cloudformation/cloudformation-coverage-roadmap#655 this PR will never work. |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #32886
#32886
Reason for this change
Prevent EC2 replace when toggling IMDSv2 required to true.
Description of changes
What code changes did you make?
Pre-existing behavior is if a launchTemplate exists then it bails early.
I updated the warning to better explain what's going on.
I removed the creation of a new launchTemplate entirely.
Instead I'm using a pre-existing method to add the option to the metadata.
Unless there was a previous setting in the template (example json is made up):
Then it merges them instead of dropping the previous possibly unrelated things using typescript
...
.Describe any new or updated permissions being added
No new permissions.
Description of how you validated changes
I copied this part of the code to my stack and instead of
this.warn
I usedconsole.log
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license