FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_route

Provides a resource to create a routing table entry (a route) in a VPC routing table.

~> NOTE on Route Tables and Routes: Terraform currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite rules.

Example usage:

resource "aws_route" "r" {
    route_table_id = "rtb-4fbb3ac4"
    destination_cidr_block = "10.0.1.0/22"
    vpc_peering_connection_id = "pcx-45ff3dc1"
    depends_on = ["aws_route_table.testing"]
}

Argument Reference

The following arguments are supported:

Each route must contain either a gateway_id, a nat_gateway_id, an instance_id or a vpc_peering_connection_id or a network_interface_id. Note that the default route, mapping the VPC’s CIDR block to “local”, is created implicitly and cannot be specified.

Attributes Reference

The following attributes are exported:

~> NOTE: Only the target type that is specified (one of the above) will be exported as an attribute once the resource is created.


See the source of this document at Terraform.io