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

openwebui_code_execution_config (Resource)

Manages the two ways Open WebUI runs code, each with its own engine and its own Jupyter settings.

Code execution runs a code block a user clicks Run on. The code interpreter is the tool a model calls on its own, and it takes the extra prompt template. The code_execution_* attributes apply to the first, the code_interpreter_* attributes to the second, and Open WebUI reads each set of Jupyter attributes only when the matching engine is jupyter.

Open WebUI writes those four keys on every update, so this resource requires all four.

Example Usage

resource "openwebui_code_execution_config" "example" {
  enable_code_execution             = true
  code_execution_engine             = "jupyter"
  code_execution_jupyter_url        = "http://jupyter.internal:8888"
  code_execution_jupyter_auth       = "token"
  code_execution_jupyter_auth_token = var.jupyter_token

  enable_code_interpreter = false
  code_interpreter_engine = "jupyter"
}

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

Schema

Required

  • code_execution_engine (String) Engine that runs the code, e.g. jupyter. Open WebUI reads the code_execution_jupyter_* attributes only when this is jupyter.
  • code_interpreter_engine (String) Engine that runs the code interpreter, e.g. jupyter. Open WebUI reads the code_interpreter_jupyter_* attributes only when this is jupyter.
  • enable_code_execution (Boolean) Whether a user can run a code block from a chat.
  • enable_code_interpreter (Boolean) Whether a model can run code on its own, as a tool, rather than waiting for a user to click Run.

Optional

  • code_execution_jupyter_auth (String) Authentication type for the Jupyter server, e.g. token or password.
  • code_execution_jupyter_auth_password (String, Sensitive) Password for the Jupyter server. Sensitive.
  • code_execution_jupyter_auth_token (String, Sensitive) Auth token for the Jupyter server. Sensitive.
  • code_execution_jupyter_timeout (Number) Request timeout in seconds for the Jupyter server.
  • code_execution_jupyter_url (String) URL of the Jupyter server used for code execution.
  • code_interpreter_jupyter_auth (String) Authentication type for the code interpreter Jupyter server.
  • code_interpreter_jupyter_auth_password (String, Sensitive) Password for the code interpreter Jupyter server. Sensitive.
  • code_interpreter_jupyter_auth_token (String, Sensitive) Auth token for the code interpreter Jupyter server. Sensitive.
  • code_interpreter_jupyter_timeout (Number) Request timeout in seconds for the code interpreter Jupyter server.
  • code_interpreter_jupyter_url (String) URL of the Jupyter server used for the code interpreter.
  • code_interpreter_prompt_template (String) System prompt template used with the code interpreter.

Read-Only

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

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Open WebUI holds one code execution configuration, so this resource is a
# singleton. Import it under its fixed id.
terraform import openwebui_code_execution_config.example code_execution