1 Resources terminal_server
Forgejo Actions edited this page 2026-11-26 06:34:52 +00:00

openwebui_terminal_server (Resource)

Manages one terminal server connection in Open WebUI. A terminal server gives chats a shell, either directly or through an orchestrator that hands out sessions.

Open WebUI keeps every terminal server in one list and replaces that list on each write, so the provider reads the list, splices this entry, and writes it back. Connections it does not manage pass through untouched, apart from the policy and lifecycle keys, which Open WebUI itself drops from every connection on every write. Two terraform apply runs against the same Open WebUI at the same time can lose a connection: the lock that orders these writes lives in one provider process.

Example Usage

resource "openwebui_terminal_server" "example" {
  server_id = "workshop"
  name      = "Workshop terminals"
  url       = "http://terminals.internal:8080"
  auth_type = "bearer"
  key       = var.terminal_server_key
}

# An orchestrator hands out sessions under a policy it holds itself. Open WebUI
# stores only the id of that policy.
resource "openwebui_terminal_server" "orchestrated" {
  server_id   = "sandboxes"
  name        = "Sandbox orchestrator"
  url         = "http://sandboxes.internal:8080"
  server_type = "orchestrator"
  policy_id   = "default"
}

variable "terminal_server_key" {
  type      = string
  sensitive = true
}

Schema

Required

  • server_id (String) Identifier of the connection within the terminal server list. You choose it, Open WebUI does not. Changing it replaces the connection.
  • url (String) Base URL of the terminal server, e.g. http://terminals.internal:8080.

Optional

  • auth_type (String) Authentication type for the terminal server, e.g. bearer. Defaults to bearer.
  • config_json (String) JSON object of extra configuration for the terminal server, e.g. jsonencode({ timeout = 30 }).
  • enabled (Boolean) Whether Open WebUI offers this terminal server. Defaults to true.
  • key (String, Sensitive) API key or bearer token for the terminal server. Sensitive. Open WebUI returns it unmasked.
  • name (String) Display name of the terminal server.
  • path (String) Path to the terminal server's OpenAPI spec. Defaults to /openapi.json.
  • policy_id (String) Identifier of the policy the orchestrator applies to sessions from this connection. The policy itself lives on the orchestrator, not in Open WebUI.
  • server_type (String) Kind of terminal server, orchestrator or terminal. Null lets Open WebUI detect it.

Read-Only

  • id (String) Terraform identifier. Always equal to server_id.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# A terminal server is imported by its server_id.
terraform import openwebui_terminal_server.example workshop