Skip to content
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

Closed
wants to merge 28 commits into from

Conversation

Leo10Gama
Copy link
Member

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 the Route 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 an addRoute() method, which creates a CfnRoute 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

@github-actions github-actions bot added the p2 label Aug 9, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team August 9, 2024 22:17
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 9, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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.

@shikha372 shikha372 self-assigned this Aug 9, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review August 12, 2024 16:50

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@Leo10Gama Leo10Gama changed the title feat(vpc-v2): add addRoute() method to RouteTable feat(vpc-v2): add add methods to RouteTable and SubnetV2 Aug 12, 2024
*/
public associateRouteTable(routeTableProps: IRouteTableV2) {
this._routeTable = routeTableProps;
this.routeTableAssociation.addPropertyOverride('RouteTableId', routeTableProps.routeTableId);
Copy link
Member Author

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.

Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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.

@aws-cdk-automation aws-cdk-automation dismissed their stale review August 16, 2024 00:22

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@Leo10Gama Leo10Gama marked this pull request as ready for review August 19, 2024 17:42
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 0dba8bb
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 23, 2024
@Leo10Gama
Copy link
Member Author

Changes will be applied in PR31224

@Leo10Gama Leo10Gama closed this Aug 30, 2024
@Leo10Gama Leo10Gama deleted the vpcv2-rt-addroute branch August 30, 2024 20:34
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants