AWS CloudFormation
User Guide (Version )

AWS::EC2::SubnetCidrBlock

Associates a single IPv6 CIDR block with a VPC subnet.

Syntax

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

JSON

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

YAML

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

Properties

Ipv6CidrBlock

The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

Required: Yes

Type: String

Update requires: Replacement

SubnetId

The ID of the subnet.

Required: Yes

Type: String

Update requires: Replacement

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the name of the subnet CIDR block.

For more information about using the Ref function, see Ref.

Examples

Subnet CIDR Block Association

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

JSON

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

YAML

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