aws-cdk-lib.aws_ec2.CfnVPCCidrBlockProps

interface CfnVPCCidrBlockProps

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnVPCCidrBlockProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnVPCCidrBlockProps
Javasoftware.amazon.awscdk.services.ec2.CfnVPCCidrBlockProps
Pythonaws_cdk.aws_ec2.CfnVPCCidrBlockProps
TypeScript aws-cdk-lib » aws_ec2 » CfnVPCCidrBlockProps

Properties for defining a CfnVPCCidrBlock.

Example

declare const vpc: ec2.Vpc;

// make an ipv6 cidr
const ipv6cidr = new ec2.CfnVPCCidrBlock(this, 'CIDR6', {
  vpcId: vpc.vpcId,
  amazonProvidedIpv6CidrBlock: true,
});

// connect the ipv6 cidr to all vpc subnets
let subnetcount = 0;
let subnets = [...vpc.publicSubnets, ...vpc.privateSubnets];
for ( let subnet of subnets) {
  // Wait for the ipv6 cidr to complete
  subnet.node.addDependency(ipv6cidr);
  this._associate_subnet_with_v6_cidr(subnetcount, subnet);
  subnetcount++;
}

const cluster = new eks.Cluster(this, 'hello-eks', {
  vpc: vpc,
  ipFamily: eks.IpFamily.IP_V6,
  vpcSubnets: [{ subnets: [...vpc.publicSubnets] }],
});

Properties

NameTypeDescription
vpcIdstringThe ID of the VPC.
amazonProvidedIpv6CidrBlock?boolean | IResolvableRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.
cidrBlock?stringAn IPv4 CIDR block to associate with the VPC.
ipv4IpamPoolId?stringAssociate a CIDR allocated from an IPv4 IPAM pool to a VPC.
ipv4NetmaskLength?numberThe netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
ipv6CidrBlock?stringAn IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.
ipv6IpamPoolId?stringAssociates a CIDR allocated from an IPv6 IPAM pool to a VPC.
ipv6NetmaskLength?numberThe netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
ipv6Pool?stringThe ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.

vpcId

Type: string

The ID of the VPC.


amazonProvidedIpv6CidrBlock?

Type: boolean | IResolvable (optional)

Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.

You cannot specify the range of IPv6 addresses, or the size of the CIDR block.


cidrBlock?

Type: string (optional)

An IPv4 CIDR block to associate with the VPC.


ipv4IpamPoolId?

Type: string (optional)

Associate a CIDR allocated from an IPv4 IPAM pool to a VPC.

For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .


ipv4NetmaskLength?

Type: number (optional)

The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.

For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .


ipv6CidrBlock?

Type: string (optional)

An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

To let Amazon choose the IPv6 CIDR block for you, omit this parameter.


ipv6IpamPoolId?

Type: string (optional)

Associates a CIDR allocated from an IPv6 IPAM pool to a VPC.

For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .


ipv6NetmaskLength?

Type: number (optional)

The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.

For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .


ipv6Pool?

Type: string (optional)

The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.