The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
litellm_user Resource
Manages an internal user on the LiteLLM proxy. Internal users can log into the Admin UI, own API keys, and belong to teams
Example Usage
resource "litellm_user" "alice" {
user_email = "[email protected]"
user_alias = "Alice"
user_role = "internal_user"
max_budget = 100.0
budget_duration = "30d"
tpm_limit = 100000
rpm_limit = 1000
teams = [litellm_team.engineering.id]
models = ["gpt-4o", "claude-sonnet-4-5"]
metadata = {
department = "engineering"
}
model_max_budget = jsonencode({
"gpt-4o" = {
max_budget = 25.0
}
})
}
Argument Reference
user_id(Optional, Forces new resource) - Unique ID for the user. Generated by the server if not provideduser_email(Optional) - Email address of the useruser_alias(Optional) - Descriptive name for the useruser_role(Optional) - Role of the user. One ofproxy_admin,proxy_admin_viewer,internal_user,internal_user_viewerteams(Optional) - List of team IDs the user belongs tomodels(Optional) - Models the user is allowed to callmax_budget(Optional) - Maximum budget in USD for the userbudget_duration(Optional) - Budget reset period, e.g.30s,30m,30dtpm_limit(Optional) - Tokens per minute limitrpm_limit(Optional) - Requests per minute limitmax_parallel_requests(Optional) - Maximum number of parallel requestsmetadata(Optional) - Map of metadata for the userauto_create_key(Optional, Defaulttrue, Forces new resource) - Whether to auto-create an API key on creationsend_invite_email(Optional, Defaultfalse, Forces new resource) - Whether to send an invite email on creationkey_alias(Optional) - Alias for the auto-created API keyaliases(Optional) - Map of model aliases for the userconfig(Optional) - Map of config values for the userpermissions(Optional) - Map of permission values for the usermodel_max_budget(Optional) - JSON string of per-model budget config, e.g.jsonencode({"gpt-4o" = {max_budget = 10.0}})guardrails(Optional) - List of guardrails applied to the user's requestsblocked(Optional, Defaultfalse) - Whether to block the key auto-created with the user. Only sent on creation, so changing it afterwards has no effect. The proxy has no user-level block; uselitellm_key_blockto block keys
Attribute Reference
id- The user IDkey(Sensitive) - The auto-created API key for the user, populated whenauto_create_keyistrue
Import
Users can be imported using the user ID:
terraform import litellm_user.alice <user-id>