github.com/erriapo/terraform@v0.6.12-0.20160203182612-0340ea72354f/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  ~> **NOTE on Route Tables and Routes:** Terraform currently
    14  provides both a standalone [Route resource](route.html) and a Route Table resource with routes
    15  defined in-line. At this time you cannot use a Route Table with in-line routes
    16  in conjunction with any Route resources. Doing so will cause
    17  a conflict of rule settings and will overwrite rules.
    18  
    19  ## Example usage with tags:
    20  
    21  ```
    22  resource "aws_route_table" "r" {
    23      vpc_id = "${aws_vpc.default.id}"
    24      route {
    25          cidr_block = "10.0.1.0/24"
    26          gateway_id = "${aws_internet_gateway.main.id}"
    27      }
    28  
    29  	tags {
    30  		Name = "main"
    31  	}
    32  }
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The following arguments are supported:
    38  
    39  * `vpc_id` - (Required) The ID of the routing table.
    40  * `route` - (Optional) A list of route objects. Their keys are documented below.
    41  * `tags` - (Optional) A mapping of tags to assign to the resource.
    42  * `propagating_vgws` - (Optional) A list of virtual gateways for propagation.
    43  
    44  Each route supports the following:
    45  
    46  * `cidr_block` - (Required) The CIDR block of the route.
    47  * `gateway_id` - (Optional) The Internet Gateway ID.
    48  * `nat_gateway_id` - (Optional) The NAT Gateway ID.
    49  * `instance_id` - (Optional) The EC2 instance ID.
    50  * `vpc_peering_connection_id` - (Optional) The VPC Peering ID.
    51  * `network_interface_id` - (Optional) The ID of the elastic network interface (eni) to use.
    52  
    53  Each route must contain either a `gateway_id`, an `instance_id`, a `nat_gateway_id`, a
    54  `vpc_peering_connection_id` or a `network_interface_id`. Note that the default route, mapping
    55  the VPC's CIDR block to "local", is created implicitly and cannot be specified.
    56  
    57  ## Attributes Reference
    58  
    59  The following attributes are exported:
    60  ~> **NOTE:** Only the target that is entered is exported as a readable
    61  attribute once the route resource is created.
    62  
    63  * `id` - The ID of the routing table