github.com/nicgrayson/terraform@v0.4.3-0.20150415203910-c4de50829380/website/source/docs/providers/aws/r/route_table.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_route_table"
     4  sidebar_current: "docs-aws-resource-route-table|"
     5  description: |-
     6    Provides a resource to create a VPC routing table.
     7  ---
     8  
     9  # aws\_route\_table
    10  
    11  Provides a resource to create a VPC routing table.
    12  
    13  ## Example usage with tags:
    14  
    15  ```
    16  resource "aws_route_table" "r" {
    17      vpc_id = "${aws_vpc.default.id}"
    18      route {
    19          cidr_block = "10.0.1.0/24"
    20          gateway_id = "${aws_internet_gateway.main.id}"
    21      }
    22  
    23  	tags {
    24  		Name = "main"
    25  	}
    26  }
    27  ```
    28  
    29  ## Argument Reference
    30  
    31  The following arguments are supported:
    32  
    33  * `vpc_id` - (Required) The ID of the routing table.
    34  * `route` - (Optional) A list of route objects. Their keys are documented below.
    35  * `tags` - (Optional) A mapping of tags to assign to the resource.
    36  
    37  Each route supports the following:
    38  
    39  * `cidr_block` - (Required) The CIDR block of the route.
    40  * `gateway_id` - (Optional) The Internet Gateway ID.
    41  * `instance_id` - (Optional) The EC2 instance ID.
    42  * `vpc_peering_connection_id` - (Optional) The VPC Peering ID.
    43  
    44  Each route must contain either a `gateway_id`, an `instance_id` or a `vpc_peering_connection_id`. Note that the
    45  default route, mapping the VPC's CIDR block to "local", is created implicitly and
    46  cannot be specified.
    47  
    48  ## Attributes Reference
    49  
    50  The following attributes are exported:
    51  
    52  * `id` - The ID of the routing table