- Model enforcement: only explicitly enabled models can be called.
- A single model enabled, shared with a single project. Nothing is shared workspace-wide. Terraform manages only what it declares: models enabled before this apply stay enabled, so start from a clean workspace when full exclusivity matters.
- Workspace-wide PII redaction that fails closed: when the detector cannot run, the request is blocked rather than passed through.
- Secret detection as a blocking guardrail on both input and output. The built-in detector needs no configuration; see Guardrail Rules for how the built-ins behave. Output blocking applies to non-streamed responses: a streamed response has already reached the caller by the time the verdict lands.
- A hard monthly budget with email alerts at 50% and 80% of the ceiling.
- A restricted, expiring API key scoped to the single project, granted only what it needs.
ALL permission mode.
Configuration
main.tf
What each control gives
Beyond Terraform
Audit Logs complete the enterprise posture but are an organization-level feature configured outside Terraform: see Audit Logs for enabling and exporting them. For stricter variants, the full provider reference covers per-entity budgets (IDENTITY, API_KEY, MODEL scopes), CEL-matched budgets, PII entity allowlists per language, and custom evaluator-backed guardrails.