3 Resources tool_server_access
Forgejo Actions edited this page 2026-11-27 23:33:32 +00:00

openwebui_tool_server_access (Resource)

Owns whether one MCP tool server connection is enabled, who may use it and (optionally) its display name. A missing connection is created only when auth_type is oauth_2.1 (dynamic client registration: Open WebUI registers itself with the server, so no credential is needed); any other missing connection fails the plan, because its credential is entered in Open WebUI. The connection is found by server_id (info.id). url and auth_type are checked and never written; a difference fails the plan. The key, headers and OAuth registration are never read into state, and every other connection and field is sent back as read; an apply that would change any of them, or end a tool sign-in, fails. Destroying the resource leaves the connection as it is. Use it instead of openwebui_tool_server when the connection and its credentials are managed in Open WebUI.

Example Usage

# The connection and its credential are added in Open WebUI; this owns only
# whether it is enabled and who may use it.
resource "openwebui_tool_server_access" "corn" {
  server_id   = "corn"
  url         = "https://corn.example/mcp"
  auth_type   = "oauth_2.1"
  enabled     = true
  read_access = ["public"]
}

Schema

Required

  • auth_type (String) Expected auth type (none, bearer, session, system_oauth, oauth_2.1, oauth_2.1_static). Checked, never written.
  • enabled (Boolean) config.enable. A disabled server stays registered and offers no tools.
  • read_access (Set of String) Who may use the server: public, group:<name>, user:<email> (or group-id:/user-id:). [] is admins only.
  • server_id (String) info.id of an existing MCP connection.
  • url (String) Expected connection URL. Checked, never written.

Optional

  • name (String) Display name shown in the tool picker (info.name). Unset leaves the stored name; the ID (server_id), which chats and model defaults refer to, never changes.

Read-Only

  • id (String) The server ID.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The server id (info.id).
tofu import openwebui_tool_server_access.corn corn