terraform-provider-onyx/docs/resources/embedding_provider.md
A cloud embedding provider credential (one per provider type). api_key is masked by the API on read, so out-of-band changes cannot be detected; the configured value is authoritative and is resent on every update. The currently-active embedding provider cannot be deleted (the API offers no override) — switch search settings off it first.
# Keep api_key set in configuration: the Onyx API replaces all fields on
# update, so applying without it clears the stored key.
resource "onyx_embedding_provider" "cohere" {
provider_type = "cohere"
api_key = var.cohere_api_key
}
provider_type (String) Provider type: openai, cohere, voyage, google, litellm, or azure. Changing it replaces the resource.api_key (String, Sensitive) Provider API key. Keep this set in configuration: because the API has no keep-stored-key flag, an update applied without it clears the stored key.api_url (String) Custom API URL (LiteLLM proxy, Azure).api_version (String) API version (Azure).deployment_name (String) Deployment name (Azure).id (String) Same as provider_type (the API's natural key).Import is supported using the following syntax:
The terraform import command can be used, for example:
#!/bin/sh
# Import by provider type (the API's natural key).
terraform import onyx_embedding_provider.cohere cohere