mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
* feat(terraform): close key/team schema gaps, fix team read envelope, add import support * feat(terraform): add fallback resource/data source and key/team block resources * feat(terraform): add access group and unified access group resources and data sources * feat(terraform): add guardrail and prompt resources and data sources * feat(terraform): add agent and search tool resources and data sources * feat(terraform): add user and budget resources and data sources * feat(terraform): add tag and project resources and data sources * docs(terraform): changelog and readme for parity additions * feat(terraform): add data sources for keys, teams, models, organizations, and mcp servers * fix(terraform): key update 400 on empty budget_duration, key info envelope, config-supplied key * fix(terraform): hash raw keys to SHA-256 tokens in key lookup URLs and block resource IDs
2 KiB
2 KiB
litellm_prompt Resource
Manages a prompt in LiteLLM. Prompts let you manage prompt templates from external providers such as Langfuse, or inline dotprompt content.
Example Usage
resource "litellm_prompt" "langfuse_prompt" {
prompt_id = "my-langfuse-prompt"
prompt_integration = "langfuse"
api_base = "https://cloud.langfuse.com"
api_key = var.langfuse_api_key
prompt_type = "db"
litellm_params = jsonencode({
prompt_id = "prompt-name-in-langfuse"
})
}
Dotprompt
resource "litellm_prompt" "greeting" {
prompt_id = "greeting"
prompt_integration = "dotprompt"
prompt_type = "db"
dotprompt_content = <<-EOT
---
model: gpt-5.2
---
Say hello to {{name}}.
EOT
}
Argument Reference
prompt_id- (Required, Forces new resource) Unique identifier for the prompt.prompt_integration- (Required) The prompt integration provider (e.g.langfuse,dotprompt).api_base- (Optional) Base URL for the prompt provider API.api_key- (Optional, Sensitive) API key for the prompt provider. Never read back into state.provider_specific_query_params- (Optional) JSON string of provider-specific query parameters.ignore_prompt_manager_model- (Optional) If true, ignore the model specified in the prompt manager.ignore_prompt_manager_optional_params- (Optional) If true, ignore optional params from the prompt manager.dotprompt_content- (Optional) Content for the dotprompt integration.litellm_params- (Optional, Sensitive) JSON string with additionallitellm_paramsmerged into the request, e.g. the integration's ownprompt_id,prompt_directoryorprompt_data. Never read back into state.prompt_type- (Optional) Type of prompt:configordb.
Attribute Reference
id- The prompt ID (same asprompt_id).
Import
Prompts can be imported using the prompt ID:
terraform import litellm_prompt.example my-langfuse-prompt