Skip to main content
Routes determine how network traffic is directed within a VPC network, specifying the path that traffic should take based on destination addresses.

Schema

Required

  • destination (Attributes) : Destination for the route. Each destination CIDR must be unique within a route table. When multiple routes match a destination IP, the route with the longest matching prefix (most specific match) is selected. (see below for nested schema)
  • next_hop (Attributes) Next hop configuration specifying where to send matching traffic. (see below for nested schema)
  • parent_id (String) Identifier of the parent resource to which the resource belongs.

Optional

  • description (String) Optional description of the route.
  • labels (Map of String) : Labels associated with the resource.
  • metadata (Attributes) : metadata.parent_id represents the RouteTable.

    Inner value description

    Common resource metadata. (see below for nested schema)
  • name (String) Human readable name for the resource.

Read-Only

  • created_at (String) : Timestamp indicating when the resource was created. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • id (String) Identifier for the resource, unique for its resource type.
  • resource_version (Number) : Version of the resource for safe concurrent modifications and consistent reads. Positive and monotonically increases on each resource spec change (but not on each change of the resource’s container(s) or status). Service allows zero value or current.
  • status (Attributes) Current status of the route. (see below for nested schema)
  • updated_at (String) : Timestamp indicating when the resource was last updated. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM

Nested Schema for destination

Required:
  • cidr (String) : Destination CIDR block in IPv4 format (e.g., “0.0.0.0/0” for default route, “192.168.100.0/24” for specific subnet). The CIDR notation specifies the range of IP addresses that this route will match. Must be unique within a route table.

Nested Schema for next_hop

Optional:
  • allocation (Attributes) : Forward traffic to a specific IP allocation (/32 address only). The allocation must be from the same network as the route table. The allocation must be assigned to either a Compute instance or a Load Balancer. Warning: If the allocation exists but is not assigned to any resource, traffic will be forwarded to a “black hole” and dropped.

    Inner value description

    AllocationNextHop specifies an IP allocation as the next hop. Cannot be set alongside default_egress_gateway. (see below for nested schema)
  • default_egress_gateway (Boolean) : Use the default egress gateway for outbound traffic. Note: For VMs with public addresses (Floating IPs/FIPs), the FIP-specific route takes precedence over this default egress gateway route. Cannot be set alongside allocation.

Nested Schema for next_hop.allocation

Required:
  • id (String) ID of the IP allocation to use as the next hop.

Nested Schema for metadata

Nested Schema for status

Read-Only:
  • next_hop (Attributes) Detailed status of the next hop configuration. (see below for nested schema)
  • state (String) : Current state of the route.

    Supported values

    Possible values:
    • STATE_UNSPECIFIED - The state is unknown or not yet set.
    • READY - The route is configured and operational.

Nested Schema for status.next_hop

Read-Only:
  • allocation (Attributes) : Status of an allocation-based next hop. Cannot be set alongside default_egress_gateway. (see below for nested schema)
  • default_egress_gateway (Attributes) : Status of the default egress gateway configuration. Cannot be set alongside allocation. (see below for nested schema)

Nested Schema for status.next_hop.allocation

Read-Only:
  • cidr (String) The CIDR of the allocation being used as the next hop.

Nested Schema for status.next_hop.default_egress_gateway