2 Resources images_config
Forgejo Actions edited this page 2026-11-26 06:51:28 +00:00

openwebui_images_config (Resource)

Manages Open WebUI image generation and image editing settings (Open WebUI 0.13.x). The update route writes every field, so this resource owns the whole section. Deleting it only removes it from state.

Example Usage

resource "openwebui_images_config" "this" {
  enable_image_generation        = true
  enable_image_prompt_generation = true
  enable_image_edit              = true
  image_generation_default_model = "gateway:gpt-image"
  image_edit_default_model       = "gateway:gpt-image"

  connections = [{
    id   = "gateway"
    name = "Gateway"
    type = "openai"
    url  = "https://llm.example.com/v1"
    # key omitted: keep the key Open WebUI already holds for this connection id.
    config_json = jsonencode({
      enable       = true
      capabilities = { image_generation = true, image_edit = true }
      model_ids    = ["gpt-image"]
      size         = "1024x1024"
    })
  }]
}

Schema

Required

  • connections (Attributes List) IMAGE_CONNECTIONS, in order. Open WebUI replaces the whole list on every update. (see below for nested schema)
  • enable_image_edit (Boolean) Open WebUI setting ENABLE_IMAGE_EDIT.
  • enable_image_generation (Boolean) Open WebUI setting ENABLE_IMAGE_GENERATION.
  • enable_image_prompt_generation (Boolean) Open WebUI setting ENABLE_IMAGE_PROMPT_GENERATION.
  • image_edit_default_model (String) Open WebUI setting IMAGE_EDIT_DEFAULT_MODEL: <connection id>:<model id>, or empty.
  • image_generation_default_model (String) Open WebUI setting IMAGE_GENERATION_DEFAULT_MODEL: <connection id>:<model id>, or empty.

Read-Only

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

Nested Schema for connections

Required:

  • config_json (String) The connection's config object as JSON, for example jsonencode({ enable = true, model_ids = ["marine"] }). Compared semantically.
  • id (String) Connection id. Default models refer to it as <id>:<model>.
  • name (String) Display name.
  • type (String) Connection type, for example openai.
  • url (String) Base URL of the endpoint.

Optional:

  • key (String, Sensitive) API key. Leave it out to keep the key Open WebUI already holds for the connection with the same id; it is then neither sent from configuration nor recorded in state.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Open WebUI holds one image-generation configuration, so this resource is a
# singleton. Import it under its fixed id.
terraform import openwebui_images_config.this images