6 Home
Forgejo Actions edited this page 2026-11-27 05:38:26 +00:00

openwebui Provider

The openwebui provider manages an Open WebUI deployment through its REST API. It covers Open WebUI v0.13.

Configuration

The provider needs the base URL of the instance and an API token from an administrator account. Set them in the provider block, or leave them out and set OPENWEBUI_ENDPOINT and OPENWEBUI_TOKEN in the environment. The token is the API key on the Account page of the Open WebUI settings. An administrator token is required, because the configuration resources read and write the admin API.

What the provider manages

The navigation lists every resource and data source. They fall into four groups.

Content: openwebui_knowledge and openwebui_knowledge_file, openwebui_file, openwebui_model, openwebui_prompt, openwebui_skill, openwebui_tool, openwebui_function, openwebui_pipeline, and the _valves resources that carry the settings of a tool, a function, or a pipeline.

People and access: openwebui_user, openwebui_group, openwebui_channel, and openwebui_default_user_permissions for what a new account may do.

Instance configuration: one resource for each page of the admin settings, including openwebui_admin_config, openwebui_chat_config, openwebui_audio_config, openwebui_images_config, openwebui_videos_config, openwebui_rag_config, openwebui_rag_embedding_config, openwebui_code_execution_config, openwebui_task_config, openwebui_subagents_config, openwebui_evaluation_config, openwebui_ldap_config, openwebui_banners_config, openwebui_suggestions_config, and openwebui_models_config. Each one is a singleton: the instance holds a single copy of those settings, so declare the resource once. openwebui_config_export reads the whole configuration back, and openwebui_config_import restores one.

Backends: openwebui_ollama_connections and openwebui_openai_connections for model endpoints, openwebui_tool_server and openwebui_terminal_server for external servers, and openwebui_oauth_client for the credentials they authenticate with. openwebui_tool_servers_config writes the whole tool server list at once, and openwebui_connections_config carries the direct-connection settings. The _verify data sources ask Open WebUI to connect to an endpoint, and the read fails when it cannot.

Example Usage

terraform {
  required_providers {
    openwebui = {
      source  = "chrisguidry/openwebui"
      version = "~> 1.4"
    }
  }
}

provider "openwebui" {
  endpoint = "https://openwebui.example.com"
  token    = var.openwebui_token
}

variable "openwebui_token" {
  type        = string
  sensitive   = true
  description = "Admin API token for the Open WebUI instance."
}

# The same settings come from the environment when the provider block leaves
# them out, which keeps the token out of the configuration entirely:
#
#   export OPENWEBUI_ENDPOINT=https://openwebui.example.com
#   export OPENWEBUI_TOKEN=...
#
# provider "openwebui" {}

Schema

Optional

  • endpoint (String) Base URL of the Open WebUI instance, e.g. https://openwebui.example.com. Can also be set via the OPENWEBUI_ENDPOINT environment variable.
  • insecure_skip_verify (Boolean) Disable TLS certificate verification. Not recommended for production use. Can also be set via the OPENWEBUI_INSECURE environment variable, where any non-empty value disables verification.
  • token (String, Sensitive) Bearer token used to authenticate requests to the Open WebUI API. Can also be set via the OPENWEBUI_TOKEN environment variable.

Data sources

Resources