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

openwebui_tool_valves (Resource)

Configures the Valves (settings) of an Open WebUI tool. Valves are the tool's user-configurable parameters.

Example Usage

resource "openwebui_tool" "example" {
  tool_id = "web_scraper"
  name    = "Web Scraper"
  content = file("${path.module}/tools/web_scraper.py")
}

# Valves are the settings the tool reads at run time. They live apart from the
# tool, so changing one does not rewrite the code.
resource "openwebui_tool_valves" "example" {
  tool_id = openwebui_tool.example.id

  valves_json = jsonencode({
    max_pages = 5
    timeout   = 30
  })
}

Schema

Required

  • tool_id (String) Identifier of the tool whose valves to configure. Forces replacement.

Optional

  • valves_json (String) JSON object of valve values to apply. Keys must match the tool's Valves schema. e.g. jsonencode({ max_pages = 5, timeout = 30 }).

Read-Only

  • id (String) Terraform identifier. Always equal to tool_id.
  • spec_json (String) JSON schema specification of the tool's Valves class. Read-only; returned by Open WebUI.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Valves belong to a tool, so the import id is the tool_id.
terraform import openwebui_tool_valves.example web_scraper