A representation of Kong’s route object. Services can have many routes, but a route corresponds to just one service.
For more information on regex_priority, see the Kong docs.
resource "kong_route" "mock" {
  service_id  = "${kong_service.mockbin.id}"
  paths       = ["/mock"]
}
The following fields are supported:
| field | explanation | type | default | required | 
|---|---|---|---|---|
| service_id | Unique identifier of the associated service. | string | Y | |
| hosts | Host header values that should be matched to this route. | set[string] | N | |
| methods | HTTP verbs that Kong will proxy to this route | set[string] | N | |
| paths | List of path prefixes that will match this route | set[string] | N | |
| preserve_host | If the route is matched by the Hostheader, this flag indicates if theHostheader should be set to the matched value. | bool | false | N | 
| protocols | Protocols that Kong will proxy to this route | set[string] | N | |
| regex_priority | Determines the order that paths defined by regexes are evaluated. | int | 0 | N | 
| strip_path | If the route is matched by path, this flag indicates whether the matched path should be removed from the upstream request. | bool | true | N | 
The following computed attributes are also available:
| field | explanation | type | 
|---|---|---|
| created_at | Unix timestamp of creation date. | int | 
| updated_at | Unix timestamp of last edit date. | int | 
Existing Kong routes can be imported into Terraform:
terraform import kong_route.name-of-route-to-import <route UUID>