aws-cdk-lib.aws_ec2.VpnConnectionProps

interface VpnConnectionProps

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

Example

// 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

NameTypeDescription
ipstringThe ip address of the customer gateway.
vpcIVpcThe VPC to connect to.
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.


vpc

Type: IVpc

The VPC to connect to.


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.