![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=1738889280-WowWlCrTiPcPz7ytCJtN2qaL2mD6pTuN-0-aa23ed28ba7a207bf17b1f32ad550fe3)
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.