$ terraform fmt --help
Usage: terraform [global options] fmt [options] [target...]
Rewrites all Terraform configuration files to a canonical format. Both
configuration files (.tf) and variables files (.tfvars) are updated.
JSON files (.tf.json or .tfvars.json) are not modified.
By default, fmt scans the current directory for configuration files. If you
provide a directory for the target argument, then fmt will scan that
directory instead. If you provide a file, then fmt will process just that
file. If you provide a single dash ("-"), then fmt will read from standard
input (STDIN).
Calculate a list of non-encrypted .tf files, and tell terraform fmt to only format those.