feat(ec2): well-known port aliases#29793
Conversation
| /** Well-known Microsoft Remote Desktop Protocol port (TCP 3389) */ | ||
| public static readonly RDP = Port.tcp(3389); | ||
| /** Well-known PostgreSQL port (TCP 5432) */ | ||
| public static readonly POSTGRES = Port.tcp(5432); |
There was a problem hiding this comment.
Let me know if you would like to add more, but I think we should stick to the officially IANA assigned port, even if the AWS web console lists additional ones
aws-cdk-automation
left a comment
There was a problem hiding this comment.
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.
|
Exemption Request: These are only aliases of existing methods, a new integration is not necessary |
| * Interface for classes that provide the connection-specification parts of a security group rule | ||
| */ | ||
| export class Port { | ||
| /** Well-known SSH port (TCP 22) */ |
There was a problem hiding this comment.
only a nit: do we need "Well-known" in all these? Cleaner to just have SSH port (TCP 22) ?
There was a problem hiding this comment.
I like the explicit mention that this is not an arbitrary port and protocol assignment. It's not really needed but I don't feel like it's unwarranted. We could also mention that it comes from the IANA, either replacing or complementing the "well-known"
There was a problem hiding this comment.
I would have added these at the top of the class/enum JSDoc if they weren't declared alongside the rest of the Port class, but I don't think separating them is worth avoiding the repetition
msambol
left a comment
There was a problem hiding this comment.
Super helpful. Nice job 👍🏼
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
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. If you need help, please open a new issue that references this one. |
Issue # (if applicable)
None as far as I can tell
Reason for this change
The web console lists commonly used ports when adding a rule to a security group, this aims to reproduce this simple quality of life shortcut. It can also help with code readability, and might save people from a typo
Description of changes
PortinstancesDescription of how you validated changes
Compared the AWS web console values to the IANA list, and added a unit test to make sure the alias behaved properly
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license