Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::EC2::SubnetCidrBlock

The AWS::EC2::SubnetCidrBlock resource associates a single IPv6 CIDR block with an Amazon VPC subnet.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Type" : "AWS::EC2::SubnetCidrBlock", "Properties" : { "Ipv6CidrBlock" : String, "SubnetId" : String } }

YAML

Copy
Type: "AWS::EC2::SubnetCidrBlock" Properties: Ipv6CidrBlock: String SubnetId: String

Properties

Ipv6CidrBlock

The IPv6 CIDR block for the subnet. The CIDR block must have a prefix length of /64.

Required: Yes

Type: String

Update requires: Replacement

SubnetId

The ID of the subnet to associate the IPv6 CIDR block with.

Required: Yes

Type: String

Update requires: Replacement

Example

The following example associates an IPv6 CIDR block (with a prefix length of /64) with the Ipv6TestSubnet subnet.

JSON

Copy
{ "Ipv6TestSubnetCidrBlock": { "Type": "AWS::EC2::SubnetCidrBlock", "Properties": { "Ipv6CidrBlock": { "Ref" : "Ipv6SubnetCidrBlock" }, "SubnetId": { "Ref" : "Ipv6TestSubnet" } } } }

YAML

Copy
Ipv6TestSubnetCidrBlock: Type: "AWS::EC2::SubnetCidrBlock" Properties: Ipv6CidrBlock: !Ref Ipv6SubnetCidrBlock SubnetId: !Ref Ipv6TestSubnet