---
title: "exoscale_vpc_route (Resource)"
description: "Manage Exoscale VPC Subnet routes https://community.exoscale.com/product/networking/vpc/how-to/using-routing-rules/.\nRoutes are immutable: any change to their attributes forces re-creation.\nParent resource: exoscalevpcsubnet ./vpc_subnet.md."
url: https://community.exoscale.com/reference/terraform/provider/resources/vpc_route/
section: reference
last_updated: 2026-10-01
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# exoscale_vpc_route (Resource)

Manage Exoscale [VPC Subnet routes](https://community.exoscale.com/product/networking/vpc/how-to/using-routing-rules/index.md).

Routes are immutable: any change to their attributes forces re-creation.

Parent resource: [exoscale_vpc_subnet](https://community.exoscale.com/reference/terraform/provider/resources/vpc_subnet/index.md).

## Example Usage

```terraform
locals {
  zone = "ch-gva-2"
}

resource "exoscale_vpc_route" "my_vpc_route" {
  zone        = local.zone
  vpc_id      = "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
  subnet_id   = "9ecc6b8b-73d4-4211-8ced-f7f29bb79524"
  destination = "10.0.9.0/24"
  target      = "ip=10.0.0.5"
  description = "route to 10.0.9.0/24 via 10.0.0.5"
}
```

Please refer to the [examples](https://github.com/exoscale/terraform-provider-exoscale/tree/master/examples/)
directory for complete configuration examples.


## Schema

### Required

- `destination` (String) ❗ The route destination CIDR (e.g. `10.9.0.0/24`).
- `subnet_id` (String) ❗ The parent [exoscale_vpc_subnet](https://community.exoscale.com/reference/terraform/provider/resources/vpc_subnet/index.md) ID.
- `target` (String) ❗ The route target (e.g. `ip=10.0.0.5`).
- `vpc_id` (String) ❗ The parent [exoscale_vpc](https://community.exoscale.com/reference/terraform/provider/resources/vpc/index.md) ID.
- `zone` (String) ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.

### Optional

- `description` (String) ❗ A free-form text describing the route.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.

## Import

```shell
# An existing VPC route may be imported by `<vpc-ID>@<subnet-ID>@<route-ID>@<zone>`:

terraform import \
  exoscale_vpc_route.my_vpc_route \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6@9ecc6b8b-73d4-4211-8ced-f7f29bb79524@9ecc6b8b-73d4-4211-8ced-f7f29bb79525@ch-gva-2
```

