fix(ec2): update RouterType.GATEWAY JSDoc to mention Virtual Private Gateway#38397
fix(ec2): update RouterType.GATEWAY JSDoc to mention Virtual Private Gateway#38397deveshsinghal09 wants to merge 0 commit into
Conversation
There was a problem hiding this comment.
The pull request linter fails with the following errors:
❌ Fixes must contain a change to a test file.
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
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.
✅ A exemption request has been requested. Please wait for a maintainer's review.
|
Exemption Request: This PR only updates a JSDoc comment for the RouterType.GATEWAY enum to improve documentation. There are no functional code changes that require unit or integration tests. |
8d9672f to
3c7254a
Compare
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #37632
Summary
Fixes the misleading JSDoc comment on
RouterType.GATEWAYinaws-ec2.Problem
The doc comment on
RouterType.GATEWAYonly mentioned Internet Gateway, but the underlying CloudFormationGatewayIdproperty actually accepts both an Internet Gateway ID and a Virtual Private Gateway ID:This makes the API misleading for users who want to add a route targeting a Virtual Private Gateway (VGW), as shown in the issue.
Solution
Updated the JSDoc comment to accurately reflect both supported gateway types and added a
@seelink to the CloudFormation reference documentation.Changes
packages/aws-cdk-lib/aws-ec2/lib/vpc.ts: UpdatedRouterType.GATEWAYJSDoc commentAdditional Notes
vpc.test.tsalready coverRouterType.GATEWAYusage; no new tests needed for a comment fix.