Skip to content

Style guide

For better experience, we recommend using VS Code - we have a list of recommended extensions to prevent many common errors, improve code and save time.

We use .editorconfig. It fixes basic mistakes on every file saving.

Please make sure to install pre-commit-terraform with all its dependencies. It checks all changed files when you run git commit for more complex problems and tries to fix them for you.

Bash

Firstly, please install shellcheck to have vscode-shellcheck extension working properly.

We use Google Style Guide.

Terraform

We use Terraform Best Practices.com code style and conceptions.

Autogenerated Documentation

For the successful module documentation initialization, you need to create README.md with:

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

It is needed for terraform-docs hooks. The hook rewrites all the things inside with every .tf file change.

Then run pre-commit run --all-files or make some changes in any .tf file in the same dir (for ex. variable "name" { -> variable "name"{).