1 Data sources openai_connection_verify
Forgejo Actions edited this page 2026-11-26 06:34:52 +00:00

openwebui_openai_connection_verify (Data Source)

Verifies that an OpenAI-compatible endpoint is reachable and accepts the provided credentials.

Example Usage

# Open WebUI makes the request, so the endpoint has to be reachable from the
# Open WebUI server, not from the machine running Terraform. The read fails if
# the endpoint refuses the credentials.
data "openwebui_openai_connection_verify" "openai" {
  url = "https://api.openai.com/v1"
  key = var.openai_api_key
}

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

Schema

Required

  • url (String) Base URL to verify, e.g. https://api.openai.com/v1.

Optional

  • api_provider (String) Provider hint, e.g. azure. Passed to Open WebUI's verification logic.
  • api_version (String) Azure API version, e.g. 2024-02-01. Used when api_provider = "azure".
  • auth_type (String) Authentication method, e.g. bearer. Passed to Open WebUI's verification logic.
  • headers_json (String, Sensitive) JSON object of custom headers to include in the verification request.
  • key (String, Sensitive) API key or bearer token. Sensitive.

Read-Only

  • verified (Boolean) Always true. The read fails with an error when Open WebUI cannot reach the endpoint or the endpoint refuses the credentials, so this attribute never reads false.