aws / aws/aws-cdk

aws-ec2: missing props in `VpnConnection` L2 construct

Open
#32,519 5 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-ec2 bug effort/medium p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

The current [VpnConnection](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpnConnection.html) L2 construct lacks critical configuration options, forcing you to resort to using the L1 [CfnVPNConnection](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPNConnection.html).

Specifically:

- The tunnel type defaults to Static, with no option to set it to Dynamic.
- There's no way to configure Phase 1 and Phase 2 settings for tunnels in [VpnTunnelOption](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpnTunnelOption.html).

These limitations significantly restrict the usability of the `VpnConnection` construct for more advanced VPN setups.

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Version

_No response_

### Expected Behavior

See above.

### Current Behavior

See above.

### Reproduction Steps

See above.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.172.0

### Framework Version

_No response_

### Node.js Version

22.11.0

### OS

Ubuntu 24.04

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Compare the L2 VpnConnection and VpnTunnelOption APIs with the linked CfnVPNConnection properties first. Confirm the required dynamic tunnel type and Phase 1 and Phase 2 settings, then verify the construct exposes them without requiring the L1 resource; done means advanced VPN configurations can be expressed through the L2 API.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.