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,001 B
1,001 B
litellm_guardrails Data Source
Retrieves the list of all guardrails configured on the LiteLLM proxy (from both config and DB). Sensitive litellm_params are not exposed.
Example Usage
data "litellm_guardrails" "all" {}
output "guardrail_ids" {
value = data.litellm_guardrails.all.ids
}
output "guardrail_names" {
value = [for g in data.litellm_guardrails.all.guardrails : g.guardrail_name]
}
Argument Reference
This data source takes no arguments.
Attribute Reference
guardrails- List of guardrails. Each entry contains:guardrail_id- Unique identifier of the guardrail.guardrail_name- Human-readable name of the guardrail.guardrail_info- Map of additional metadata for the guardrail.guardrail_definition_location- Where the guardrail is defined:configordb.created_at- Timestamp when the guardrail was created.updated_at- Timestamp when the guardrail was last updated.
ids- List of all guardrail IDs.