mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +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
1.6 KiB
1.6 KiB
litellm_users Data Source
Retrieves a page of LiteLLM users, with optional server-side filters
Example Usage
data "litellm_users" "internal" {
role = "internal_user"
page = 1
page_size = 100
}
output "internal_user_ids" {
value = data.litellm_users.internal.ids
}
Argument Reference
role(Optional) - Filter users by roleuser_ids(Optional) - Comma-separated list of user IDs to filter byuser_email(Optional) - Filter users by partial email matchteam(Optional) - Filter users by team IDpage(Optional, Default1) - Page number to fetchpage_size(Optional, Default25) - Number of users per page, max 100sort_by(Optional) - Column to sort by, e.g.user_id,user_email,created_atsort_order(Optional) - Sort order,ascordesc
Attribute Reference
users- Users returned for the requested page. Each entry has:user_id- The user IDuser_email- Email address of the useruser_alias- Descriptive name for the useruser_role- Role of the user on the proxyteams- List of team IDs the user belongs tomodels- Models the user is allowed to callmax_budget- Maximum budget in USDspend- Current spend in USDtpm_limit- Tokens per minute limitrpm_limit- Requests per minute limitkey_count- Number of API keys owned by the usercreated_at- Timestamp when the user was created
ids- IDs of the users returned for the requested pagetotal- Total number of users matching the filterstotal_pages- Total number of pages available