Skip to content

exoscale_vpc_route (Resource)

Manage Exoscale VPC Subnet routes.

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

Parent resource: exoscale_vpc_subnet.

Example Usage

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 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 ID.
  • target (String) ❗ The route target (e.g. ip=10.0.0.5).
  • vpc_id (String) ❗ The parent exoscale_vpc ID.
  • zone (String) ❗ The Exoscale Zone name.

Optional

  • description (String) ❗ A free-form text describing the route.
  • timeouts (Block, Optional) (see below for nested schema)

Read-Only

  • id (String) The ID of this resource.

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration 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 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 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 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

# 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
Last updated on