terraform fmt on save not actually occurring
See original GitHub issueIf have Format on Save enabled, and on saving a .tf file, the output shows it running terraform fmt
on the file:
2019-03-29 15:15:41:274 [INFO ] formatting-provider: running 'terraform fmt' on 'c:\Users\user\project-dir\main.tf'
2019-03-29 15:15:41:275 [INFO ] runner: Running terraform cwd='C:\Users\user\AppData\Local\Programs\Microsoft VS Code' path='terraform' (version: 0.11.11) args=[fmt, -]
2019-03-29 15:15:42:492 [INFO ] file-system-watcher: Indexed file:///c%3A/Users/user/project-dir/main.tf
2019-03-29 15:15:44:340 [INFO ] runner: Running terraform succeeded.
However, the formatting is not applied and file remains unchanged.
Running terraform fmt
on the file via the console has the expected formatting effect on the file.
_This issue was also mentioned by @IronFarm in https://github.com/mauve/vscode-terraform/issues/62#issuecomment-426944230_
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:9 (2 by maintainers)
Top Results From Across the Web
terraform -fmt --recursive not doing anything / not working
When running terraform fmt --recursive none of my terraform files are actually getting formatted. For example, some code in terraform version v0 ...
Read more >How to Auto Format Terraform Code in Visual Studio Code
Courses: https://www.aosnote.com/storeWebsite: https://www.aosnote.com/This video will teach you how to automatically format Terraform code ...
Read more >VSCode plugin very slow at terraform fmt on save - Reddit
The issue I'm having with the VSCode Terraform plugin is that when it saves a file it's taking nearly 5 seconds to terraform...
Read more >Pre-Commit Hooks for Terraform - Medium
This rule only checks for the tagging keys rather than the value. This will also not check if tags are being set as...
Read more >Developers - formatter does not the same as "terraform fmt" -
The formatter of the HCL plugin which is called on save does not the same as "terraform fmt". Prerequisites. [ ] Ensure you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We just released v2.0.0-rc.1 of the extension. The main features include:
You can find additional information and specifics in the release notes and CHANGELOG.
With this release we expect that many of the prior issues and PRs are no longer relevant or have been addressed, and are therefore being closed. If you feel the action taken on an issue or PR is in error, please comment as such and we can figure out the appropriate way to address it.
We plan to add the final 2.0.0 release to the marketplace soon, but are actively seeking your feedback now on the release candidates. You can download the .vsix from the releases page and manually install it in VS Code to try it out.
I’m going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.