# VpnConnectionProps

Extends: VpnConnectionProps
Extends: VpnConnectionOptions
Used as props by: VpnConnection

- Source: [`aws-ec2/lib/vpn.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ec2/lib/vpn.ts#L144)

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

- `asn`: number = 65000 — The ASN of the customer gateway.

- `ip`: string (required) — The ip address of the customer gateway.

- `staticRoutes`: string[] — The static routes to be routed from the VPN gateway to the customer gateway.

  **Default:** Dynamic routing (BGP)

- `tunnelOptions`: [VpnTunnelOption](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpnTunnelOption.html)[] — The tunnel options for the VPN connection.

  **Default:** Amazon generated tunnel options

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

- `vpc`: [IVpc](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC to connect to.
