![Learning DevOps](https://wfqqreader-1252317822.image.myqcloud.com/cover/384/36698384/b_36698384.jpg)
上QQ阅读APP看书,第一时间看更新
Formatting the code
Terraform has a command that allows the code to be properly aligned with Terraform's styles and conventions.
The following command automatically formats the code:
terraform fmt
The following is a screenshot of a Terraform-arranged file:
![](https://epubservercos.yuewen.com/A085E6/19470376308796106/epubprivate/OEBPS/Images/db6dd7f6-005d-475c-a9b8-03ce401a1164.png?sign=1739280377-PhB9OMUgaJMjM1Hs8PCVtl9UlUrjJEl0-0-759a7bfee8e08f0c0e0a3a1072e3f9eb)
The command re-formats the code and indicates the list of arranged files.
For more information on the Terraform style guide, refer to https://www.terraform.io/docs/configuration/style.html, and for information about the terraform fmt command line, read https://www.terraform.io/docs/commands/fmt.html.