![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=1739326059-2GTT2wNhz3SSHtyYW8zXH1bExLtdUBDX-0-349931a2f5987993ee8564a33554b56e)
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.