update links

WAF-110-Terraform-Code-Style-Guide
Brian McClain 2 years ago
parent dacaed0087
commit eba067c8bc

@ -9,7 +9,7 @@ description: >-
The `terraform fmt` command is used to rewrite Terraform configuration files
to a canonical format and style. This command applies a subset of
the [Terraform language style conventions](/terraform/language/syntax/style),
the [Terraform language style conventions](/terraform/language/style#syntax-conventions),
along with other minor adjustments for readability.
Other Terraform commands that generate Terraform configuration will produce

@ -76,7 +76,7 @@ The Terraform parser allows you some flexibility in how you lay out the elements
## Code formatting
The `terraform fmt` command helps ensure your Terraform code formatting is consistent by applying a subset of the [Terraform language style conventions](/terraform/language/syntax/style), such as those described in the [syntax style recommendations](#syntax-style). When you run this command, Terraform modifies your code to remove trailing whitespace, align arguments, and fix indentation. By default, the `terraform fmt` command will only modify your Terraform code in the directory that you execute it in, but you can include the `-recursive` flag to modify code in all subdirectories as well.
The `terraform fmt` command helps ensure your Terraform code formatting is consistent by applying a subset of the [Terraform language syntax conventions](#syntax-conventions), such as those described in the [syntax style recommendations](#syntax-style). When you run this command, Terraform modifies your code to remove trailing whitespace, align arguments, and fix indentation. By default, the `terraform fmt` command will only modify your Terraform code in the directory that you execute it in, but you can include the `-recursive` flag to modify code in all subdirectories as well.
We recommend that you run `terraform fmt` before each commit to source control. You can use mechanisms such as [Git pre-commit hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to automatically run this command each time you commit your code.

@ -18,6 +18,6 @@ section offer a more abstract view of the Terraform language.
Terraform language. Terraform's JSON syntax is unfriendly to humans, but can
be very useful when generating infrastructure as code with other systems that
don't have a readily available HCL library.
- [Style Conventions](/terraform/language/syntax/style) documents some commonly
- [Style Conventions](/terraform/language/style#syntax-conventions) documents some commonly
accepted formatting guidelines for Terraform code. These conventions can be
enforced automatically with [`terraform fmt`](/terraform/cli/commands/fmt).

Loading…
Cancel
Save