# VpnTunnelOption

- 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#L55)
- Type last changed: v2.21.0 · 22 Apr 2022

## 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;
const vpnTunnelOption: ec2.VpnTunnelOption = {
  preSharedKey: 'preSharedKey',
  preSharedKeySecret: secretValue,
  tunnelInsideCidr: 'tunnelInsideCidr',
};
```

## Properties

- `preSharedKey`: string — Use `preSharedKeySecret` instead

  **Default:** an Amazon generated pre-shared key

  Allowed characters are
  alphanumeric characters period `.` and underscores `_`. Must be between 8
  and 64 characters in length and cannot start with zero (0).

- `preSharedKeySecret`: [SecretValue](/cdk/api/v2/docs/aws-cdk-lib.SecretValue.html) — The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.

  **Default:** an Amazon generated pre-shared key

  Allowed characters are
  alphanumeric characters period `.` and underscores `_`. Must be between 8
  and 64 characters in length and cannot start with zero (0).

- `tunnelInsideCidr`: string — The range of inside IP addresses for the tunnel.

  **Default:** an Amazon generated inside IP CIDR

  Any specified CIDR blocks must be
  unique across all VPN connections that use the same virtual private gateway.
  A size /30 CIDR block from the 169.254.0.0/16 range.
