1 Resources openai_connection_models
Forgejo Actions edited this page 2026-11-26 09:28:48 +00:00

openwebui_openai_connection_models (Resource)

Owns the model allowlist (model_ids) of one existing OpenAI-compatible connection, found by its URL. Nothing else is managed: the connection, its key and other settings, and all other connections stay as they are, and an apply that would change any of them fails. The key is never read into state. Destroying the resource leaves the list in place. Use it instead of openwebui_openai_connections when another process owns the connections.

Example Usage

# Publish exactly these models from the gateway connection. The connection, its
# key and every other connection stay as Open WebUI has them.
resource "openwebui_openai_connection_models" "gateway" {
  url       = "https://llm.example.com/v1"
  model_ids = ["auto", "gpt-large", "claude-medium"]
}

Schema

Required

  • model_ids (Set of String) Model IDs published from this connection. Order is not meaningful to Open WebUI and is ignored. An empty set publishes every model the connection lists.
  • url (String) Base URL of the existing connection, exactly as Open WebUI stores it. It must appear exactly once.

Read-Only

  • id (String) The connection URL.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Import by the connection's base URL.
terraform import openwebui_openai_connection_models.gateway https://llm.example.com/v1