Skip to content
v2.274.0

VpnConnectionProps Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';

declare const secretValue: cdk.SecretValue;
declare const vpc: ec2.Vpc;
const vpnConnectionProps: ec2.VpnConnectionProps = {
  ip: 'ip',
  vpc: vpc,

  // the properties below are optional
  asn: 123,
  staticRoutes: ['staticRoutes'],
  tunnelOptions: [{
    preSharedKey: 'preSharedKey',
    preSharedKeySecret: secretValue,
    tunnelInsideCidr: 'tunnelInsideCidr',
  }],
};

Properties ​

asnnumberasnint | floatasnNumberAsndoubleAsn*float64= 65000#
The ASN of the customer gateway.
ipstringipstripStringIpstringIp*stringrequired#
The ip address of the customer gateway.
staticRoutesstring[]static_routestyping.List[str]staticRoutesList<String>StaticRoutesstring[]StaticRoutes*[]*string#
The static routes to be routed from the VPN gateway to the customer gateway.

Default: Dynamic routing (BGP)

tunnelOptionsVpnTunnelOption[]tunnel_optionstyping.List[VpnTunnelOption]tunnelOptionsList<VpnTunnelOption>TunnelOptionsVpnTunnelOption[]TunnelOptions*[]VpnTunnelOption#
The tunnel options for the VPN connection.

Default: Amazon generated tunnel options

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

vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The VPC to connect to.