github.com/jmbataller/terraform@v0.6.8-0.20151125192640-b7a12e3a580c/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](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: 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 * `instance_id` - (Optional) An ID of a NAT instance. 39 * `network_interface_id` - (Optional) An ID of a network interface. 40 41 Each route must contain either a `gateway_id`, an `instance_id` or a `vpc_peering_connection_id` 42 or a `network_interface_id`. Note that the default route, mapping the VPC's CIDR block to "local", 43 is created implicitly and cannot be specified. 44 45 ## Attributes Reference 46 47 The following attributes are exported: 48 49 ~> **NOTE:** Only the target type that is specified (one of the above) 50 will be exported as an attribute once the resource is created. 51 52 * `route_table_id` - The ID of the routing table. 53 * `destination_cidr_block` - The destination CIDR block. 54 * `vpc_peering_connection_id` - An ID of a VPC peering connection. 55 * `gateway_id` - An ID of a VPC internet gateway or a virtual private gateway. 56 * `instance_id` - An ID of a NAT instance. 57 * `network_interface_id` - An ID of a network interface.