rso_ingress_route (Resource)¶
A public HTTP(S) route at the edge: requests matching a rule are sent to an rso_external_service. The API has no update, so every change replaces the route.
Example Usage¶
resource "rso_ingress_route" "web" {
name = "web"
routes = [{
match = "Host(`app.example.com`)"
services = [{
external_service = rso_external_service.web.name
port = 80
}]
}]
}
# Plain HTTP on :80, no certificate.
resource "rso_ingress_route" "web_http" {
name = "web-http"
certificate = "none"
entry_points = ["http"]
routes = [{
match = "Host(`app.example.com`)"
services = [{
external_service = rso_external_service.web.name
port = 80
}]
}]
}
Schema¶
Required¶
name(String) Route name, unique within the tenant.routes(Attributes List) Rules of the route. A request is sent to the services of the rule it matches. (see below for nested schema)
Optional¶
certificate(String) How the certificate is obtained:dns(default; validated through DNS, the domain must be a zone the platform manages),http(validated over HTTP, works with any DNS provider) ornonefor a route without a certificate.entry_points(List of String) Listeners of the route:https(port 443, default) and/orhttp(port 80).
Read-Only¶
id(String) The ID of this resource.
Nested Schema for routes¶
Required:
match(String) Match rule, e.g.Host(`app.example.com`)orHost(`app.example.com`) && PathPrefix(`/api`).services(Attributes List) Backends for the rule. (see below for nested schema)
Optional:
middlewares(List of String) Names ofrso_middlewareresources applied to the rule, in order.
Nested Schema for routes.services¶
Required:
external_service(String) Name of therso_external_serviceto send traffic to.port(Number) Port of the external service.
Optional:
scheme(String)httporhttpstowards the backend.servers_transport(String) Name of the transport settings to use towards the backend, when it needs other than the defaults.
Import¶
Import is supported using the following syntax:
# Import an existing ingress route by name.
terraform import rso_ingress_route.web web