Terraform Visual Studio Code Extension
IMPORTANT: After installing, you must perform a
This extension offers several configuration options. To modify these, navigate to the extension view within VS Code, select the settings cog and choose Extension settings, or alternatively, modify the
We use telemetry to send error reports to our team, so we can respond more effectively. If you want to disable this setting, add
If you have multiple root modules in your workspace, you can configure the language server settings to identify them. Edit this through the VSCode Settings UI or add a
If you want to automatically search root modules in your workspace and exclude some folders, you can configure the language server settings to identify them.
To enable formatting, it is recommended that the following be added to the extension settings for the Terraform extension:
An experimental validate-on-save option can be enabled with the following setting:
This will create diagnostics for any elements that fail validation.
v2.0.0 is the first official release from HashiCorp, prior releases were by Mikael Olenfalk.
The 2.0.0 release integrates a new Language Server package from HashiCorp. The extension will install and upgrade terraform-ls to continue to add new functionality around code completion and formatting. See the terraform-ls CHANGELOG for details.
In addition, this new version brings the syntax highlighting up to date with all HCL2 features, as needed for Terraform 0.12 and above.
Configuration Changes Please note that in 2.x, the configuration differs from 1.4.0, if you are having issues with the Language Server starting, you can reset the configuration to the following:
See the CHANGELOG for more information.
If you are using a Terraform version prior to 0.12.0, you can install the pre-transfer version of this extension manually by following the instructions in the wiki.
We're starting a user group for the Terraform VS Code extension. This group offers opportunities to provide feedback, access pre-release versions, and help influence the direction of this project. Collaboration and updates will be via HashiCorp Discuss (discuss.hashicorp.com), along with occasional live events.
If you are interested, please complete and submit our participation form, and we will get back to you with an invite!