TerraformPilot

Infrastructure as Code

Terraform-ls v0.39.0: New Terraform Policy File Support for the Language Server

terraform-ls v0.39.0 adds completion, hover, and diagnostics for Terraform Policy files. Upgrade steps and verification included.

LLuca Berton2 min read

Introduction

#

HashiCorp released terraform-ls v0.39.0 on 23 July 2026. terraform-ls is the Language Server Protocol (LSP) implementation that powers editor features (completion, hover, diagnostics, go-to-definition) for Terraform configuration in editors such as VS Code and Neovim via the official Terraform extension/plugin. This is a small, focused release with a single enhancement.

What Is New

#

The only change in this release is support for Terraform Policy files:

Add support for Terraform Policy files. This provides block and attribute completion, hover, and diagnostics along with syntax validation for Terraform Policy files. (#2105, #2156)

In practice, this means that if you open a Terraform Policy file in an editor backed by terraform-ls v0.39.0+, you should now get the same kind of IDE assistance you already get for .tf files:

  • Block and attribute completion
  • Hover documentation
  • Diagnostics (errors/warnings)
  • Syntax validation

The release notes do not include HCL syntax examples, file extension conventions, or a schema reference for Terraform Policy files, so this article will not invent any — check the linked issues (#2105, #2156) or the release page for authoritative details as they are published.

There are no other enhancements, bug fixes, deprecations, or breaking changes listed for this release.

Upgrade Steps

#

terraform-ls is not a Terraform provider or module, so it is not pinned via required_providers in HCL. It is typically managed by your editor's Terraform extension or by a package manager. Pick the path that matches your setup:

VS Code (HashiCorp Terraform extension):

# Check the currently bundled/configured terraform-ls version
code --list-extensions --show-versions | grep hashicorp.terraform

Update the extension from the Extensions pane, or pin an explicit version in your settings.json:

{
  "terraform.languageServer.path": "/usr/local/bin/terraform-ls",
  "terraform.languageServer.args": ["serve"]
}

Manual binary install (Homebrew):

brew update
brew upgrade terraform-ls

Manual binary download:

# Linux amd64 example
curl -LO https://releases.hashicorp.com/terraform-ls/0.39.0/terraform-ls_0.39.0_linux_amd64.zip
unzip terraform-ls_0.39.0_linux_amd64.zip
sudo mv terraform-ls /usr/local/bin/terraform-ls

This release does not require changes to terraform CLI itself, so there is no corresponding terraform init -upgrade step — the upgrade is scoped entirely to the language server binary/extension.

Verify

#

Confirm the binary version after upgrading:

terraform-ls --version
# expect: terraform-ls 0.39.0

Then, in your editor, open a Terraform Policy file and confirm you see completion suggestions and hover tooltips firing — this validates that the new policy-file support from #2105/#2156 is active in your LSP session. If your editor logs LSP server output, check it for errors on startup after the upgrade.

Conclusion

#

v0.39.0 is a narrow but useful release for teams using Terraform Policy files: terraform-ls now treats them as a first-class file type with completion, hover, diagnostics, and syntax validation. There are no breaking changes or deprecations to plan for. Upgrade the language server through your editor extension or package manager, confirm the version with terraform-ls --version, and open a policy file to confirm the new editor assistance is working.

#Terraform#Terraform-ls#HashiCorp#Language Server#VS Code#IDE Tooling

Share this article