Creates and manages IonosCloud API Gateway Route objects.
Manages an API Gateway Route on IonosCloud.
This resource will create an operational API Gateway Route. After this section completes, the provisioner can be called.
id
- (Computed)[string] The ID of the API Gateway Route.
name
- (Required)[string] Name of the API Gateway Route. Only alphanumeric characters are allowed.
gateway_id
- (Required)[string] The ID of the API Gateway that the route belongs to.
type
- (Optional)[string] This field specifies the protocol used by the ingress to route traffic to the backend service. Default value: http
.
paths
- (Required)[list] The paths that the route should match. Minimum items: 1.
methods
- (Required)[list] The HTTP methods that the route should match. Minimum items: 1. Possible values: GET
, POST
, PUT
, DELETE
, PATCH
, OPTIONS
, HEAD
, CONNECT
, TRACE
.
websocket
- (Optional)[bool] To enable websocket support. Default value: false
.
upstreams
- (Required) Upstreams information of the API Gateway Route. Minimum items: 1.
scheme
- (Optional)[string] The target URL of the upstream. Default value: http
.
host
- (Required)[string] The host of the upstream.
port
- (Optional)[int] The port of the upstream. Default value: 80
.
loadbalancer
- (Optional)[string] The load balancer algorithm. Default value: roundrobin
.
weight
- (Optional)[int] Weight with which to split traffic to the upstream. Default value: 100
.
API Gateway route can be imported using the apigateway route id
: