entur / gha-terraform

Repository with reusable workflows for terraform lint, plan and apply
European Union Public License 1.2
0 stars 2 forks source link

More reasonable error message if terraform fmt fails #63

Closed egrimstad closed 1 month ago

egrimstad commented 1 month ago

image

When terraform fmt fails it is somewhat difficult to see what you should do to fix it, as it just outputs the list of files that are not formatted correctly. Would be nice if there was some kind of helpful error message that told the user what was wrong and what they can do to fix the error.

AlexanderBrevig commented 1 month ago

Something like

Please run terraform fmt

then?

Glenn-Terjesen commented 1 month ago

in this example you have not run terraform fmt on the terraform code. Tip, you can do this automatically in Ms Code and probably in intellij as well.

Terraform Format output detected errors with the following files: blabla.tf

Please run terraform fmt