-
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
feat(vpc-v2): add add
methods to RouteTable and SubnetV2
#31072
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.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
addRoute()
method to RouteTableadd
methods to RouteTable and SubnetV2
*/ | ||
public associateRouteTable(routeTableProps: IRouteTableV2) { | ||
this._routeTable = routeTableProps; | ||
this.routeTableAssociation.addPropertyOverride('RouteTableId', routeTableProps.routeTableId); |
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.
Currently we are doing an override rather than creating a new CfnSubnetRouteTableAssociation
L1. If we create a new one, we would have to find some way to remove the old association L1, otherwise they will both show up in the template, and may confuse users who synthesize and see two associations for one table. The override allows us to use the same L1 object, just alter which route table it points to.
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.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Changes will be applied in PR31224 |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
N/A
Reason for this change
With this change, routes can be created in a given
RouteTable
without the need to use theRoute
L2 class. This will streamline the process of routing different endpoints together, making for an overall more enjoyable user experience.Description of changes
RouteTable
now has anaddRoute()
method, which creates aCfnRoute
object in the stack that links the provided IP destination to a provided router target.Description of how you validated changes
Unit tests have been added to validate the behaviour of the new method, and it has been included in one aspect of the existing
integ.route-v2.ts
integration test.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license