Infrastructure: Tooling
Unlike the frontend and backend code there is no tool to write scripts in, instead the direct terraform commands should be used.
Formatting
Terraform comes with an in-build formatter which can be invoked to autoformat your code,
Run this command in infrastructure/
terraform fmt
and to check if your code meets the formatting rules,
Run this command in infrastructure/
terraform fmt --check=true
Linting
Terraform also comes with a tool to check your code,
Run this command in infrastructure/
terraform validate
Testing
I currently don't know of a good technique to test the Terraform code, other than running
Run this command in infrastructure/
terraform plan
and checking the output makes sense.
Note
These commands won't work or do much yet, as we have no terraform files to format, lint, or test.