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

openwebui_prompt (Resource)

Manages a reusable prompt command in Open WebUI. The command is the slash-command users type to invoke the prompt.

Example Usage

resource "openwebui_prompt" "example" {
  command = "summarize"
  name    = "Summarize Text"
  content = "Summarize the following in 3 concise bullet points:\n\n{{text}}"

  read_groups  = ["Support"]
  write_groups = ["Support"]
}

Schema

Required

  • command (String) Slash-command identifier, e.g. summarize. The leading / is normalised automatically.
  • content (String) Prompt template text. Use {{variable}} for user-fillable placeholders.
  • name (String) Display name of the prompt.

Optional

  • data_json (String) The prompt's data object, as JSON. Open WebUI stores it and reads it back without interpreting it. Use jsonencode({}) to set an empty object.
  • meta_json (String) The prompt's meta object, as JSON. Open WebUI stores it and reads it back without interpreting it. Use jsonencode({}) to set an empty object.
  • public_read (Boolean) When true, every signed-in user can read the prompt. This is what the Open WebUI interface calls public sharing.
  • public_write (Boolean) When true, every signed-in user can edit the prompt.
  • read_groups (List of String) List of group names or IDs granted read access.
  • read_users (List of String) List of user email addresses or IDs granted read access.
  • tags (List of String) List of tags for categorising the prompt.
  • write_groups (List of String) List of group names or IDs granted write access.
  • write_users (List of String) List of user email addresses or IDs granted write access. Name the same address in read_users as well.

Read-Only

  • created_at (String) Creation date in YYYY-MM-DD format. Set by Open WebUI.
  • id (String) Server-assigned UUID for the prompt.
  • updated_at (String) Last-updated date in YYYY-MM-DD format. 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 prompt is imported by the id Open WebUI assigned it, not by its command.
terraform import openwebui_prompt.example 5d4c3b2a-1f0e-4d9c-8b7a-6e5d4c3b2a1f