Rules¶
Ignore Rules¶
To ignore rules, you have 2 options:
- Add a comment on top of the file
# tfcoach-ignore-file: core.rule_id1,core.rule_id2 - Add a comment above the Terraform block to exclude the next block from issuing an error
# tfcoach-ignore: core.rule_id1,core.rule_id2
Core¶
| Rule | Summary |
|---|---|
| Avoid Type in Name | Names shouldn't repeat their type. |
| Avoid using hashicorp/null provider | With newer Terraform version, use locals and terraform_data as native replacement for hashicorp/null |
| Enforce Variable Description | To understand what that variable does (even if it seems trivial), always add a description |
| File Naming | File naming should follow a strict convention. |
| Naming Convention | Terraform names should only contain lowercase alphanumeric characters and underscores. |
| Required Provider Must Be Declared | All providers used in resources or data sources are declared in the terraform.required_providers block. |