# VpnConnectionOptions

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

## Example

```ts
// Across all tunnels in the account/region
const allDataOut = ec2.VpnConnection.metricAllTunnelDataOut();

// For a specific vpn connection
const vpnConnection = vpc.addVpnConnection('Dynamic', {
  ip: '1.2.3.4'
});
const state = vpnConnection.metricTunnelState();
```

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