YAML

YAML

Define declarative tunnels in a YAML configuration file.


In apply mode, rstream run reads a YAML file that describes tunnels and optional contexts. The loader expands environment variables before decoding and rejects unknown fields, which makes the configuration suitable for version control and infrastructure-as-code workflows.

The root schema contains version, tunnels, and an optional contexts map. The current supported version is 1.

Minimal example

version: 1
tunnels:
  - name: dev-api
    forward: 8080
    tunnel:
      publish: true
      protocol: http
      http:
        version: http/1.1
        upstreamTLS: false
        tokenAuth: true

The forward field accepts port and host:port forms and defaults the host to localhost when only a port is provided.

Context selection

A tunnel can reference a context in three ways: an inline context object, a named context entry from the file, or the fallback context provided by the CLI runtime. A fallback context must include an engine and token.

Named contexts can also be marked as external. In that case, the name is resolved through the CLI context store.

Validation behavior

The decoder runs in strict mode and rejects unknown keys. Duplicate tunnel names are rejected. Missing required fields (name, forward, and tunnel) fail the load.