litellm/terraform/provider/docs/data-sources/fallback.md
Shivam Rawat 3653e5893f
feat(terraform): resource and data source parity with the community provider (#38158)
* 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
2026-08-28 16:55:40 -07:00

948 B

litellm_fallback (Data Source)

Retrieves the fallback configuration for a LiteLLM model. Use this to reference fallbacks that were configured outside of Terraform.

Example Usage

data "litellm_fallback" "gpt4" {
  model = "gpt-4"
}

output "gpt4_fallback_models" {
  value = data.litellm_fallback.gpt4.fallback_models
}

Specific Fallback Type

data "litellm_fallback" "gpt4_context_window" {
  model         = "gpt-4"
  fallback_type = "context_window"
}

Argument Reference

The following arguments are supported:

  • model - (Required) The model name to get fallbacks for.
  • fallback_type - (Optional) Type of fallback to retrieve. One of general (default), context_window, or content_policy.

Attribute Reference

In addition to the arguments above, the following attributes are exported:

  • id - The primary model name.
  • fallback_models - List of fallback model names in order of priority.