LinuxCommandLibrary

tofu-fmt

Format OpenTofu configuration files

TLDR

Format current directory

$ tofu fmt
copy
Format recursively
$ tofu fmt -recursive
copy
Check formatting
$ tofu fmt -check
copy
Show diff
$ tofu fmt -diff
copy

SYNOPSIS

tofu fmt [options] [dir]

DESCRIPTION

tofu fmt formats OpenTofu configuration files. OpenTofu is the open-source fork of Terraform. Formats HCL files to canonical style for consistency.

PARAMETERS

-recursive

Process subdirectories.
-check
Check if formatted.
-diff
Show formatting diff.
-write
Write changes.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community