Configuration for a VPC subnet.

interface SubnetSpecArgs {
    cidrBlocks?: string[];
    cidrMask?: number;
    name?: string;
    size?: number;
    tags?: any;
    type: ec2.SubnetType;
}

Properties

cidrBlocks?: string[]

An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.

cidrMask?: number

The netmask for the subnet's CIDR block. This is optional, the default value is inferred from the cidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

name?: string

The subnet's name. Will be templated upon creation.

size?: number

Optional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the cidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

tags?: any

A map of tags to assign to the resource.

The type of subnet.

Generated using TypeDoc