-
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
fix(ecs): outdated linux commands for canContainersAccessInstanceRole=false
and also deprecate property
#32763
Conversation
canContainersAccessInstanceRole=false
adds wrong commands for AL2023canContainersAccessInstanceRole=false
and also deprecate property
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.
canContainersAccessInstanceRole=false
and also deprecate propertycanContainersAccessInstanceRole=false
and also deprecate property
canContainersAccessInstanceRole=false
and also deprecate propertycanContainersAccessInstanceRole=false
and also deprecate property
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32763 +/- ##
=======================================
Coverage 81.52% 81.52%
=======================================
Files 222 222
Lines 13715 13715
Branches 2417 2417
=======================================
Hits 11181 11181
Misses 2254 2254
Partials 280 280
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Thanks @samson-keung for the contribution. LGTM. Just left a nit comment.
// new commands | ||
autoScalingGroup.addUserData('sudo yum install -y iptables-services; sudo iptables --insert DOCKER-USER 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP'); | ||
autoScalingGroup.addUserData('sudo iptables-save | sudo tee /etc/sysconfig/iptables && sudo systemctl enable --now iptables'); |
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.
nit: May be it would be nice to add the official AWS link doc as a comment above this line from where these commands were taken.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This pull request has been removed from the queue for the following reason: The pull request can't be updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #28518.
Reason for this change
When
canContainersAccessInstanceRole=false
, wrong commands are added to the ASG UserData, as described in the issue linked above.Reason for deprecating the
canContainersAccessInstanceRole
option is detailed in #32609.Description of changes
canContainersAccessInstanceRole
options.canContainersAccessInstanceRole
behaviourDescribe any new or updated permissions being added
None
Description of how you validated changes
A new integ test is added to ensure the commands in UserData executes without throwing errors.
The existing integ tests are updated to have the default feature flag values and they are passing. This should prove that there will not be any change to existing CDK apps.
Unit tests are added for each platform, combination of possible values for
canContainersAccessInstanceRole
+ possible values for the feature flags (3 platforms * 3 possible values forcanContainersAccessInstanceRole
* 2 possible values for@aws-cdk/aws-ecs:disableEcsImdsBlocking
* 2 possible values for@aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature
= 36 unit tests).Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license