> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Terraform Resources

> Every resource the Orq.ai Terraform provider manages, with links to the full reference.

Each resource links to its full schema reference on the Terraform Registry, including import syntax and complete examples.

## Workspace administration

| Resource                                                                                                                | Manages                                                                    |
| ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [`orq_project`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/project)                       | Projects, including team assignment                                        |
| [`orq_workspace_settings`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/workspace_settings) | Workspace display name, model enforcement, PII redaction                   |
| [`orq_api_key`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/api_key)                       | API keys: project scoping, permission presets or per-domain grants, expiry |
| [`orq_management_key`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/management_key)         | Management Keys for automation and delegation                              |

## Models

| Resource                                                                                                          | Manages                                                         |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [`orq_workspace_model`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/workspace_model) | Enabling catalog models and sharing them with projects          |
| [`orq_model`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/model)                     | Custom OpenAI-compatible models with a private base URL         |
| [`orq_bedrock_model`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/bedrock_model)     | AWS Bedrock models, via Pod Identity or a dashboard integration |
| [`orq_routing_rule`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/routing_rule)       | Model routing: fallback, weighted, latency-based, round-robin   |

## Quality and cost controls

| Resource                                                                                                        | Manages                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| [`orq_evaluator`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/evaluator)           | LLM-as-judge and Python **Evaluators**                                                                                            |
| [`orq_guardrail_rule`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/guardrail_rule) | [Guardrails](/docs/ai-gateway/configuration/guardrail-rules): built-in PII and secret detection, or custom evaluator-backed rules |
| [`orq_budget`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/budget)                 | Spend, token, and rate ceilings with threshold alerts                                                                             |
| [`orq_notifier`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/resources/notifier)             | Email and webhook alert destinations                                                                                              |

## Data sources

| Data source                                                                                            | Returns                                                          |
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| [`orq_projects`](https://registry.terraform.io/providers/orq-ai/orq/latest/docs/data-sources/projects) | Projects in the workspace, for referencing existing ones by name |

## Example: a guardrail backed by an evaluator

A taste of composing resources: an LLM **Evaluator** judged by a model, enforced as a blocking guardrail.

```hcl theme={"theme":{"light":"github-light","dark":"github-dark"}}
resource "orq_evaluator" "tone" {
  key         = "professional-tone"
  type        = "llm_eval"
  project_id  = orq_project.production.id
  mode        = "single"
  model       = "openai/gpt-4o-mini"
  prompt      = "Return true when the response maintains a professional tone.\n\nResponse:\n{{log.output}}"
  output_type = "boolean"
}

resource "orq_guardrail_rule" "tone_guard" {
  display_name = "Professional tone only"
  enabled      = true

  guardrails {
    id           = orq_evaluator.tone.id
    execute_on   = "output" # input | output | both
    is_guardrail = true     # block on failure instead of observe-only
  }
}
```
