mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #31286 from BrianSidebotham/update_docs_for_30072
Fixes #30072 - Update docs to show single file usage
This commit is contained in:
commit
06baea9ae1
@ -528,15 +528,18 @@ func (c *FmtCommand) trimNewlines(tokens hclwrite.Tokens) hclwrite.Tokens {
|
||||
|
||||
func (c *FmtCommand) Help() string {
|
||||
helpText := `
|
||||
Usage: terraform [global options] fmt [options] [DIR]
|
||||
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.
|
||||
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.
|
||||
|
||||
If DIR is not specified then the current working directory will be used.
|
||||
If DIR is "-" then content will be read from STDIN. The given content must
|
||||
be in the Terraform language native syntax; JSON is not supported.
|
||||
If TARGET is not specified, the command uses the current working directory.
|
||||
If TARGET is a file, the command only uses the specified file. If TARGET
|
||||
is "-" then the command reads from STDIN.
|
||||
|
||||
The content must be in the Terraform language native syntax; JSON is not
|
||||
supported.
|
||||
|
||||
Options:
|
||||
|
||||
|
@ -45,12 +45,10 @@ and the generated files.
|
||||
|
||||
## Usage
|
||||
|
||||
Usage: `terraform fmt [options] [DIR]`
|
||||
Usage: `terraform fmt [options] [TARGET]`
|
||||
|
||||
By default, `fmt` scans the current directory for configuration files. If
|
||||
the `dir` argument is provided then it will scan that given directory
|
||||
instead. If `dir` is a single dash (`-`) then `fmt` will read from standard
|
||||
input (STDIN).
|
||||
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).
|
||||
|
||||
The command-line flags are all optional. The list of available flags are:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user