Skip to content

fix(ec2): update RouterType.GATEWAY JSDoc to mention Virtual Private Gateway#38397

Closed
deveshsinghal09 wants to merge 0 commit into
aws:mainfrom
deveshsinghal09:fix/ec2-routertype-gateway-doc-comment
Closed

fix(ec2): update RouterType.GATEWAY JSDoc to mention Virtual Private Gateway#38397
deveshsinghal09 wants to merge 0 commit into
aws:mainfrom
deveshsinghal09:fix/ec2-routertype-gateway-doc-comment

Conversation

@deveshsinghal09

@deveshsinghal09 deveshsinghal09 commented Jul 24, 2026

Copy link
Copy Markdown

Issue # (if applicable)

Closes #37632

Summary

Fixes the misleading JSDoc comment on RouterType.GATEWAY in aws-ec2.

Problem

The doc comment on RouterType.GATEWAY only mentioned Internet Gateway, but the underlying CloudFormation GatewayId property actually accepts both an Internet Gateway ID and a Virtual Private Gateway ID:

The ID of an internet gateway or virtual private gateway attached to your VPC.

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 @see link to the CloudFormation reference documentation.

Changes

  • packages/aws-cdk-lib/aws-ec2/lib/vpc.ts: Updated RouterType.GATEWAY JSDoc comment

Additional Notes

  • This is a documentation-only change — no behavior or API changes, zero breaking change risk.
  • The existing tests at vpc.test.ts already cover RouterType.GATEWAY usage; no new tests needed for a comment fix.

@github-actions github-actions Bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Jul 24, 2026
@aws-cdk-automation
aws-cdk-automation requested a review from a team July 24, 2026 14:00

@aws-cdk-automation aws-cdk-automation left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@deveshsinghal09

Copy link
Copy Markdown
Author

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.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Jul 24, 2026
@deveshsinghal09
deveshsinghal09 force-pushed the fix/ec2-routertype-gateway-doc-comment branch from 8d9672f to 3c7254a Compare July 24, 2026 17:11
@github-actions

Copy link
Copy Markdown
Contributor

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.

Repository owner temporarily deployed to automation July 24, 2026 17:11 — with GitHub Actions Inactive
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 24, 2026
Repository owner temporarily deployed to automation July 24, 2026 17:18 — with GitHub Actions Inactive
Repository owner temporarily deployed to automation July 24, 2026 17:23 — with GitHub Actions Inactive
@mergify
mergify Bot temporarily deployed to automation July 24, 2026 18:25 Inactive
@mergify
mergify Bot deployed to automation July 24, 2026 18:25 Active
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-ec2): RouterType.GATEWAY comment is misleading - it also supports Virtual Private Gateway

3 participants