The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.
Terraform — LSP setup
- Builtin server:
terraform—terraform-ls serve - Extensions:
.tf .tfvars - Install hint: See https://github.com/hashicorp/terraform-ls
An alias id terraform-ls exists with the identical command; either id works.
Install
- macOS:
brew install hashicorp/tap/terraform-ls - Linux: download a release from https://github.com/hashicorp/terraform-ls/releases and place
terraform-lson PATH (orapt/dnfvia the HashiCorp repo) - Windows:
choco install terraform-ls(or download a release zip)
terraform-ls requires the terraform binary itself to be installed and on PATH.
Confirm both resolve:
command -v terraform-ls
command -v terraform
Configure
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in every harness's project config (per-harness paths: the Configure step in SKILL.md):
{ "lsp": { "terraform": { "priority": 100 } } }
For builtin ids in a PROJECT config, command is supplied automatically — only set priority/initialization/extensions/disabled (a project entry drops env). env, and a fully custom (non-builtin) server with its own command, must go in your harness's USER config (see the Configure step in SKILL.md).
Initialization options (only if commonly needed)
None commonly required. Provider/module completion comes from schemas generated by terraform init. Run it in each module root before expecting full completion:
terraform init
To force schema indexing, you can set experimental features via initialization:
{ "lsp": { "terraform": { "initialization": { "experimentalFeatures": { "validateOnSave": true } } } } }
Alternatives
tflintstandalone for opinionated linting (complements the LSP).terraform fmtfor formatting.
Troubleshooting
- PATH:
terraform-lsANDterraformboth on PATH; reopen shell after install. - No provider completion: run
terraform initso the.terraform/schema cache exists. .tfvarsnot analyzed: open the containing module so the server has root context.
Verify
bun ../../scripts/verify-lsp.ts path/to/file.tf