FahamLah

Commands

tofu fmt

tofu fmt [-check] [-diff] [-recursive]

Risk: Safe

What it does

Tidies .tf files: spaces, indents and lined-up = signs. Same meaning.

When to use it

Before every commit. CI runs tofu fmt -check.

Example

$ tofu fmt

Tidy every .tf file in this folder.

$ tofu fmt -check

Only check. Lists messy files; changes nothing.

$ tofu fmt -diff

Show the changes it makes.