github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/aws/r/route.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_route" 4 sidebar_current: "docs-aws-resource-route|" 5 description: |- 6 Provides a resource to create a routing entry in a VPC routing table. 7 --- 8 9 # aws\_route 10 11 Provides a resource to create a routing table entry (a route) in a VPC routing table. 12 13 ~> **NOTE on Route Tables and Routes:** Terraform currently 14 provides both a standalone Route resource and a [Route Table](route_table.html) 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: 20 21 ``` 22 resource "aws_route" "r" { 23 route_table_id = "rtb-4fbb3ac4" 24 destination_cidr_block = "10.0.1.0/22" 25 vpc_peering_connection_id = "pcx-45ff3dc1" 26 depends_on = ["aws_route_table.testing"] 27 } 28 ``` 29 30 ## Argument Reference 31 32 The following arguments are supported: 33 34 * `route_table_id` - (Required) The ID of the routing table. 35 * `destination_cidr_block` - (Required) The destination CIDR block. 36 * `vpc_peering_connection_id` - (Optional) An ID of a VPC peering connection. 37 * `gateway_id` - (Optional) An ID of a VPC internet gateway or a virtual private gateway. 38 * `nat_gateway_id` - (Optional) An ID of a VPC NAT gateway. 39 * `instance_id` - (Optional) An ID of an EC2 instance. 40 * `network_interface_id` - (Optional) An ID of a network interface. 41 42 Each route must contain either a `gateway_id`, a `nat_gateway_id`, an 43 `instance_id` or a `vpc_peering_connection_id` or a `network_interface_id`. 44 Note that the default route, mapping the VPC's CIDR block to "local", is 45 created implicitly and cannot be specified. 46 47 ## Attributes Reference 48 49 The following attributes are exported: 50 51 ~> **NOTE:** Only the target type that is specified (one of the above) 52 will be exported as an attribute once the resource is created. 53 54 * `route_table_id` - The ID of the routing table. 55 * `destination_cidr_block` - The destination CIDR block. 56 * `vpc_peering_connection_id` - An ID of a VPC peering connection. 57 * `gateway_id` - An ID of a VPC internet gateway or a virtual private gateway. 58 * `nat_gateway_id` - An ID of a VPC NAT gateway. 59 * `instance_id` - An ID of a NAT instance. 60 * `network_interface_id` - An ID of a network interface.