snippetbashTip
tofu fmt — Format configuration according to OpenTofu language style conventions. More information: <https://op
Viewed 0 times
accordingconfigurationcommandlanguageformatclitofu fmtopentofu
Problem
How to use the
tofu fmt command: Format configuration according to OpenTofu language style conventions. More information: <https://opentofu.org/docs/cli/commands/fmt/>.Solution
tofu fmt — Format configuration according to OpenTofu language style conventions. More information: <https://opentofu.org/docs/cli/commands/fmt/>.Format the configuration in the current directory:
tofu fmtFormat the configuration in the current directory and subdirectories:
tofu fmt -recursiveDisplay diffs of formatting changes:
tofu fmt -diffDo not list files that were formatted to
stdout:tofu fmt -list=falseCode Snippets
Format the configuration in the current directory
tofu fmtFormat the configuration in the current directory and subdirectories
tofu fmt -recursiveDisplay diffs of formatting changes
tofu fmt -diffDo not list files that were formatted to `stdout`
tofu fmt -list=falseContext
tldr-pages: common/tofu fmt
Revisions (0)
No revisions yet.