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

openwebui_file (Resource)

Uploads a local file to Open WebUI. Replacement is forced on any attribute change because files are immutable after upload.

Example Usage

resource "openwebui_file" "example" {
  source_path = "${path.module}/files/document.pdf"
  process     = true
}

Schema

Required

  • source_path (String) Absolute or module-relative path to the file to upload. Forces replacement.

Optional

  • metadata_json (String) Optional JSON metadata to attach to the file on upload. e.g. jsonencode({ category = "docs" }). Forces replacement.
  • process (Boolean) Whether Open WebUI should process the file for RAG (chunk and embed it). Defaults to false. Forces replacement.
  • process_in_background (Boolean) Whether RAG processing runs asynchronously. Only relevant when process = true. Defaults to false. Forces replacement.

Read-Only

  • created_at (Number) Unix timestamp of when the file was uploaded. Set by Open WebUI.
  • data_json (String) JSON data blob associated with the file as returned by Open WebUI.
  • filename (String) Original filename as stored by Open WebUI. Set by Open WebUI.
  • hash (String) SHA-256 hash of the uploaded file content. Set by Open WebUI.
  • id (String) UUID assigned by Open WebUI on upload.
  • meta_json (String) JSON metadata blob associated with the file as returned by Open WebUI.
  • updated_at (Number) Unix timestamp of when the file record was last updated. Set by Open WebUI.
  • user_id (String) Owner user identifier. Set by Open WebUI.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# A file is imported by the UUID Open WebUI assigned it on upload. Open WebUI
# never returns the local path, so source_path stays empty in state and the
# first plan after the import replaces the file by uploading it again.
terraform import openwebui_file.example 3b2d5c7a-1e4f-4b8c-9d0a-6f5e4d3c2b1a