aws-cdk-lib.aws_ec2.VpnConnectionOptions

interface VpnConnectionOptions

LanguageType name
.NETAmazon.CDK.AWS.EC2.VpnConnectionOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#VpnConnectionOptions
Javasoftware.amazon.awscdk.services.ec2.VpnConnectionOptions
Pythonaws_cdk.aws_ec2.VpnConnectionOptions
TypeScript (source)aws-cdk-lib » aws_ec2 » VpnConnectionOptions

Example

const vpc = new ec2.Vpc(this, 'MyVpc', {
  vpnConnections: {
    dynamic: { // Dynamic routing (BGP)
      ip: '1.2.3.4'
    },
    static: { // Static routing
      ip: '4.5.6.7',
      staticRoutes: [
        '192.168.10.0/24',
        '192.168.20.0/24'
      ]
    }
  }
});

Properties

NameTypeDescription
ipstringThe ip address of the customer gateway.
asn?numberThe ASN of the customer gateway.
staticRoutes?string[]The static routes to be routed from the VPN gateway to the customer gateway.
tunnelOptions?VpnTunnelOption[]The tunnel options for the VPN connection.

ip

Type: string

The ip address of the customer gateway.


asn?

Type: number (optional, default: 65000)

The ASN of the customer gateway.


staticRoutes?

Type: string[] (optional, default: Dynamic routing (BGP))

The static routes to be routed from the VPN gateway to the customer gateway.


tunnelOptions?

Type: VpnTunnelOption[] (optional, default: Amazon generated tunnel options)

The tunnel options for the VPN connection.

At most two elements (one per tunnel). Duplicates not allowed.