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

openwebui_tool_servers_config (Resource)

Manages the list of external tool server registrations for Open WebUI as a single object.

~> Note: openwebui_tool_servers_config and openwebui_tool_server manage the same list. Use one or the other, never both. openwebui_tool_server is the recommended one: it declares one connection at a time, it can adopt a connection made in the web UI, and it preserves every field of a connection that it does not model.

~> Note: This resource owns the whole list. A connection missing from connections is deleted, and a field of a connection that this resource does not model, such as an inline OpenAPI spec, is dropped on write. The encrypted OAuth registration in each connection's info is the one exception: it is read back and carried across every write.

Example Usage

resource "openwebui_tool_servers_config" "example" {
  connections = [
    {
      url       = "http://tools.internal:8080"
      path      = "/openapi.json"
      auth_type = "bearer"
      key       = var.tool_server_api_key
    },
  ]
}

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

Schema

Required

Read-Only

  • id (String) Identifier of this singleton resource. Always tool_servers.

Nested Schema for connections

Required:

  • path (String) Path to the tool server's OpenAPI spec, e.g. /openapi.json.
  • url (String) Base URL of the tool server, e.g. http://tools.internal:8080.

Optional:

  • auth_type (String) Authentication type for the tool server, e.g. bearer.
  • config_json (String) Additional JSON configuration sent to the tool server.
  • headers_json (String) JSON object of extra HTTP headers to send to the tool server. e.g. jsonencode({ X-Api-Version = "2" }).
  • key (String, Sensitive) API key or bearer token for authenticating with the tool server. Sensitive.
  • type (String) Tool server type, openapi or mcp.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The tool server list is one configuration block, so this resource is a
# singleton. Import it under its fixed id, and every registration comes with it.
# To manage one registration on its own, use openwebui_tool_server instead.
terraform import openwebui_tool_servers_config.example tool_servers