Validate
Overview
Run terraform validate and display diagnostics. Lists errors first, then warnings, each with its file and line. Expand a row to read terraform’s detail.
Interactive (TUI)
Press v from the home menu. The plugin runs validation and shows errors/warnings in an expandable list.
Keybindings
| Key | Action | When |
|---|---|---|
j / k / ↑ / ↓ |
Navigate up/down; inside a selected diagnostic taller than the view, scroll it a line first | List |
g / G |
Jump to first/last | List |
Enter / i |
Expand diagnostic detail | List |
← / → |
Scroll the list horizontally when wrapping is off | List |
Ctrl+w |
Toggle wrapping | List |
ctrl+r |
Re-run validation | Validation finished or failed |
q |
Back to home | Always |
Flow
Home ──v──→ Validate (loading) ──→ Validate (results)
│
├── Enter → Expand diagnostic detail
├── ctrl+r → Re-run validation
└── q → Home
Command Line (CLI)
tfui validate -project ./infra
tfui validate -project ./infra -ci
tfui validate -project ./infra -json
Exit codes: see CLI I/O contract.
Equivalence
| Goal | CLI | TUI |
|---|---|---|
| Validate configuration | tfui validate -ci |
Press v |
| Get diagnostics as JSON | tfui validate -json |
N/A (TUI is visual) |
| Re-validate after fix | tfui validate -ci |
v → ctrl+r |