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

Properties to define VPC [disable-awslint:from-method].

Extends: VpcV2Props
Used as props by: VpcV2

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

## Example

```ts
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc',{
      primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),
      secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({
      cidrBlockName: 'AmazonProvided',
    })]
    });

const eigw = new EgressOnlyInternetGateway(this, 'EIGW', {
  vpc: myVpc,
});

const routeTable = new RouteTable(this, 'RouteTable', {
  vpc: myVpc,
});

routeTable.addRoute('EIGW', '::/0', { gateway: eigw });
```

## Properties

- `defaultInstanceTenancy`: [DefaultInstanceTenancy](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.DefaultInstanceTenancy.html) — The default tenancy of instances launched into the VPC.

  **Default:** DefaultInstanceTenancy.Default (shared) tenancy

  By setting this to dedicated tenancy, instances will be launched on
  hardware dedicated to a single AWS customer, unless specifically specified
  at instance launch time. Please note, not all instance types are usable
  with Dedicated tenancy.

- `enableDnsHostnames`: boolean = true — Indicates whether the instances launched in the VPC get DNS hostnames.

- `enableDnsSupport`: boolean = true — Indicates whether the DNS resolution is supported for the VPC.

- `primaryAddressBlock`: [IIpAddresses](/cdk/api/v2/docs/@aws-cdk_aws-ec2-alpha.IIpAddresses.html) — A must IPv4 CIDR block for the VPC.

  **Default:** Ipv4 CIDR Block ('10.0.0.0/16')

- `secondaryAddressBlocks`: [IIpAddresses](/cdk/api/v2/docs/@aws-cdk_aws-ec2-alpha.IIpAddresses.html)[] — The secondary CIDR blocks associated with the VPC.

  **Default:** No secondary IP address

  Can be  IPv4 or IPv6, two IPv4 ranges must follow RFC#1918 convention
  For more information,

- `vpcName`: string — Physical name for the VPC.

  **Default:** autogenerated by CDK
