patternterraformModerate
Is there a way to lint Terraform?
Viewed 0 times
linttherewayterraform
Problem
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.
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.
Solution
terraform fmtThe
terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style.Context
StackExchange DevOps Q#12886, answer score: 11
Revisions (0)
No revisions yet.