> **Experimental**
>
> `@aws-cdk/aws-ec2-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# InternetGatewayOptions

Options to define InternetGateway for VPC.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/vpc-v2-base.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts#L81)

## Example

```ts
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc');

const subnet = new SubnetV2(this, 'Subnet', {
  vpc: myVpc,
  availabilityZone: 'eu-west-2a',
  ipv4CidrBlock: new IpCidr('10.0.0.0/24'),
  subnetType: SubnetType.PUBLIC });

myVpc.addInternetGateway({
  ipv4Destination: '192.168.0.0/16',
});
```

## Properties

- `internetGatewayName`: string — The resource name of the internet gateway.

  **Default:** provisioned without a resource name

  Provided name will be used for tagging

- `ipv4Destination`: string — Destination Ipv6 address for EGW route.

  **Default:** '0.0.0.0' all Ipv4 traffic

- `ipv6Destination`: string — Destination Ipv6 address for EGW route.

  **Default:** '::/0' all Ipv6 traffic

- `subnets`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html)[] — List of subnets where route to IGW will be added.

  **Default:** route created for all subnets with Type `SubnetType.Public`
