In any application with code, it is very important that the code is clean and clearly readable by all contributors (current and future) who will be involved in the maintenance and evolution of this code.
In IaC and with Terraform, it is even more important to have clear code because written code serving as documentation is an advantage of IaC.
In this recipe, we will look at how to use Terraform's command line to properly format its code and we will also see some tips for automating it.