When done, you’re ready to begin editing Terramate configuration!
For detailed setup information, please check the project’s README.
If you have the *.hcl
file extension associated with other extensions (eg.: Terraform) you can add a specific file association for Terramate in the Settings -> Text Editor -> Files -> Associations
or directly byupdating the file.associations
option in the settings.json.
See the example below:
"files.associations": {
"*.tm.hcl": "terramate"
}
Configure *.tm.hcl files with the Terramate Language Server in VSCode
Then just open any .tm
or .tm.hcl
file and start coding! The extension will highlight the Terramate syntax and give diagnostics for any change in the file.
See the complete example below:
The extension highlights HCL language constructs (attributes, blocks, literals, types, etc) and recognizes Terramate keywords.
The extension configures the editing features of VSCode for HCL. Example:
CTRL+/
inserts an HCL line comment (#
)CTRL+SHIFT+A
inserts an HCL block comment (/* … */
)[
, {
and (
) and you can use the standard VSCode shortcuts to navigate them (CTRL+SHIFT+|
for jumping to the end of a block, etc).For each file change (and save), the extension will asynchronously execute linters in the configuration directory and provide diagnostics for syntax errors, invalid Terramate schema, and configuration conflicts.
We will add more features over time. For requesting specific features, please create an issue in one of the repositories ( https://github.com/terramate-io/terramate or https://github.com/terramate-io/vscode-terramate ).
Also, If you’d like to know more about how Terramate can help your team manage infrastructure as code more efficiently, don’t hesitate to reach out to us at hello@terramate.io