Skip to content

Instantly share code, notes, and snippets.

@levpa
Last active August 3, 2024 10:46
Show Gist options
  • Save levpa/86a7e90474e8707e4e5dfbfedb4f1ba2 to your computer and use it in GitHub Desktop.
Save levpa/86a7e90474e8707e4e5dfbfedb4f1ba2 to your computer and use it in GitHub Desktop.
Terrafrom autoformat in VS Code
// As a first step: install extensions Prettier and Hashicorp Terraform
// update json user_config in VS Code
{
"terminal.integrated.enableMultiLinePasteWarning": "never",
"git.autofetch": true,
"explorer.confirmDragAndDrop": false,
"git.confirmSync": false,
"files.exclude": {
"**/.terraform": true,
"**/.terraform.lock.hcl": true
},
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file"
},
"editor.minimap.enabled": false,
"files.autoSave": "onFocusChange",
"workbench.colorTheme": "Default Dark Modern",
"explorer.compactFolders": false
}
// as a result all terraform content will be saved and formatted automatically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment