terraform-provider-onyx/docs/index.md
Manage Onyx application configuration (LLM providers, API keys, workspace settings, ...) declaratively via the Onyx admin API.
terraform {
required_providers {
onyx = {
source = "onyx-dot-app/onyx"
}
}
}
variable "onyx_api_key" {
type = string
sensitive = true
}
# Credentials can also come from ONYX_SERVER_URL / ONYX_API_KEY env vars.
provider "onyx" {
endpoint = "https://onyx.internal.example.com"
api_key = var.onyx_api_key # an admin-role API key ("on_...")
}
api_key (String, Sensitive) Admin-role Onyx API key (on_...) or unrestricted personal access token (onyx_pat_...). May also be set via the ONYX_API_KEY environment variable.api_prefix (String) Path prefix the API is served under, defaults to /api (the web proxy). Set to "" when talking directly to the backend (e.g. http://localhost:8080). May also be set via the ONYX_API_PREFIX environment variable.endpoint (String) Onyx server origin, e.g. https://cloud.onyx.app or http://localhost:3000. May also be set via the ONYX_SERVER_URL environment variable.