aws::subnet

Create a subnet in a VPC.

Example

aws::subnet example-subnet
    vpc: $(aws::vpc example-vpc)
    network-acl: $(aws::network-acl example-network-acl)
    availability-zone: us-east-1a
    cidr-block: 10.0.0.0/24
end

Attributes

Attribute Description
vpc The VPC to create the Subnet in. (Required)
cidr-block The IPv4 network range for the Subnet, in CIDR notation. (Required)
ipv6-cidr-block The IPv6 network range for the subnet, in CIDR notation.
availability-zone The name of the availability zone to create this Subnet (ex. us-east-1a).
map-public-ip-on-launch Assign a public IPv4 address to Network Interfaces created in this Subnet. Defaults to false.
default-acl-id The ID of the Default Network ACL associated to the Subnet.
network-acl The Network ACL associated to the subnet.
acl-association-id The Association ID of the Network ACL currently associated to the Subnet.
enable-dns64 When set to true, DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.
enable-resource-name-dns-aaaa-record-on-launch When set to true, responds to DNS queries for instance hostnames with DNS AAAA records.
enable-resource-name-dns-a-record-on-launch When set to true, responds to DNS queries for instance hostnames with DNS A records.
assign-ipv6-address-on-creation When set to true, indicates that network interfaces created in the specified subnet should be assigned an IPv6 address.

Outputs

Attribute Description
id The ID of the Subnet.