github.com/hobbeswalsh/terraform@v0.3.7-0.20150619183303-ad17cf55a0fa/website/source/docs/providers/aws/r/subnet.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_subnet"
     4  sidebar_current: "docs-aws-resource-subnet"
     5  description: |-
     6    Provides an VPC subnet resource.
     7  ---
     8  
     9  # aws\_subnet
    10  
    11  Provides an VPC subnet resource.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_subnet" "main" {
    17      vpc_id = "${aws_vpc.main.id}"
    18      cidr_block = "10.0.1.0/24"
    19  
    20      tags {
    21          Name = "Main"
    22      }
    23  }
    24  ```
    25  
    26  ## Argument Reference
    27  
    28  The following arguments are supported:
    29  
    30  * `availability_zone`- (Optional) The AZ for the subnet.
    31  * `cidr_block` - (Required) The CIDR block for the subnet.
    32  * `map_public_ip_on_launch` -  (Optional) Specify true to indicate
    33      that instances launched into the subnet should be assigned
    34      a public IP address.
    35  * `vpc_id` - (Required) The VPC ID.
    36  * `tags` - (Optional) A mapping of tags to assign to the resource.
    37  
    38  ## Attributes Reference
    39  
    40  The following attributes are exported:
    41  
    42  * `id` - The ID of the subnet
    43  * `availability_zone`- The AZ for the subnet.
    44  * `cidr_block` - The CIDR block for the subnet.
    45  * `vpc_id` - The VPC ID.
    46