> For the complete documentation index, see [llms.txt](https://notes.nomanaziz.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.nomanaziz.me/devops/infrastructure-as-a-code-iac/terraform/14.-testing-terraform-code.md).

# 14. Testing Terraform Code

### Static Checks

#### Built in

* terraform fmt
  * tells about about indentation format of codebase
* terraform validate
  * checks for input variables are initialized and used correctly
* terraform plan
* custom validation rules

#### External

* tflint
* checkov, tfsec, terrascan, terraform-compliance, snyk
* Terraform Sentinal (enterprise only)

***
