FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_subnet

Provides an VPC subnet resource.

Example Usage

resource "aws_subnet" "main" {
    vpc_id = "${aws_vpc.main.id}"
    cidr_block = "10.0.1.0/24"

    tags {
        Name = "Main"
    }
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Subnets can be imported using the subnet id, e.g.

$ terraform import aws_subnet.public_subnet subnet-9d4a7b6c

See the source of this document at Terraform.io