Is there a way to lint Terraform? I'm hoping there is something to pick up when I have misspelled variables and comments to save me some time when I'm checking my code and reduce the potential for any errors.
I normally use IntelliJ IDE for Terraform on a MAC but also have VS code set up that I can use.
Is there a plugin for either I could use or even a different tool?
I imaging variable might be difficult to lint due as I use underscores to separate words in my variable names so the tool would need to know to treat underscores as white space for linting purposes.
terraform fmt

The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style.