From 665f15238299331f03aba38e48228ed66db27c13 Mon Sep 17 00:00:00 2001 From: Sahal Pathan <63746256+Sahal56@users.noreply.github.com> Date: Sat, 6 Sep 2025 14:40:51 +0530 Subject: [PATCH] Update fmt.mdx Examples for better explanation. => Please review, if needed, enhance it by formatting or add more examples --- content/terraform/v1.13.x/docs/cli/commands/fmt.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/terraform/v1.13.x/docs/cli/commands/fmt.mdx b/content/terraform/v1.13.x/docs/cli/commands/fmt.mdx index 871f800eb5..17dbe10045 100644 --- a/content/terraform/v1.13.x/docs/cli/commands/fmt.mdx +++ b/content/terraform/v1.13.x/docs/cli/commands/fmt.mdx @@ -51,6 +51,18 @@ By default, the `terraform fmt` command scans your current directory for configu * A specific file * Standard input by supplying a single dash (`-`). +### Examples +```shell +# Format specific files +terraform fmt load_balancer.tf auto_scaling_group.tf + +# Format a particular directory +terraform fmt ./app + +# Format all subdirectories within the root directory +terraform fmt -recursive +``` + The `terraform fmt` command accepts the following arguments. | Flag | Description | Required |