|
1 | 1 | # Rules |
2 | 2 |
|
3 | | -Terraform language rules implement recommendations from the [Terraform language documentation](https://www.terraform.io/language). If you want to enforce additional usage and style conventions in your configuration, you can author your own ruleset plugin. |
| 3 | +Terraform Language rules implement recommendations from the [Terraform Language documentation](https://www.terraform.io/language). |
4 | 4 |
|
5 | | -Below is a list of available rules. |
| 5 | +All rules are enabled by default, but by setting `preset = "recommended"`, you can enable only the rules marked "Recommended" among the following rules. See [Configuration](../configuration.md) for details. |
6 | 6 |
|
7 | | -|Rule|Description|Enabled| |
| 7 | +|Rule|Description|Recommended| |
8 | 8 | | --- | --- | --- | |
9 | 9 | |[terraform_comment_syntax](terraform_comment_syntax.md)|Disallow `//` comments in favor of `#`|| |
10 | | -|[terraform_deprecated_index](terraform_deprecated_index.md)|Disallow legacy dot index syntax|| |
| 10 | +|[terraform_deprecated_index](terraform_deprecated_index.md)|Disallow legacy dot index syntax|✔| |
11 | 11 | |[terraform_deprecated_interpolation](terraform_deprecated_interpolation.md)|Disallow deprecated (0.11-style) interpolation|✔| |
12 | 12 | |[terraform_documented_outputs](terraform_documented_outputs.md)|Disallow `output` declarations without description|| |
13 | 13 | |[terraform_documented_variables](terraform_documented_variables.md)|Disallow `variable` declarations without description|| |
14 | | -|[terraform_empty_list_equality](terraform_empty_list_equality.md)|Disallow comparisons with `[]` when checking if a collection is empty|| |
| 14 | +|[terraform_empty_list_equality](terraform_empty_list_equality.md)|Disallow comparisons with `[]` when checking if a collection is empty|✔| |
15 | 15 | |[terraform_module_pinned_source](terraform_module_pinned_source.md)|Disallow specifying a git or mercurial repository as a module source without pinning to a version|✔| |
16 | 16 | |[terraform_module_version](terraform_module_version.md)|Checks that Terraform modules sourced from a registry specify a version|✔| |
17 | 17 | |[terraform_naming_convention](terraform_naming_convention.md)|Enforces naming conventions for resources, data sources, etc|| |
18 | | -|[terraform_required_providers](terraform_required_providers.md)|Require that all providers have version constraints through required_providers|| |
19 | | -|[terraform_required_version](terraform_required_version.md)|Disallow `terraform` declarations without require_version|| |
| 18 | +|[terraform_required_providers](terraform_required_providers.md)|Require that all providers have version constraints through required_providers|✔| |
| 19 | +|[terraform_required_version](terraform_required_version.md)|Disallow `terraform` declarations without require_version|✔| |
20 | 20 | |[terraform_standard_module_structure](terraform_standard_module_structure.md)|Ensure that a module complies with the Terraform Standard Module Structure|| |
21 | | -|[terraform_typed_variables](terraform_typed_variables.md)|Disallow `variable` declarations without type|| |
22 | | -|[terraform_unused_declarations](terraform_unused_declarations.md)|Disallow variables, data sources, and locals that are declared but never used|| |
| 21 | +|[terraform_typed_variables](terraform_typed_variables.md)|Disallow `variable` declarations without type|✔| |
| 22 | +|[terraform_unused_declarations](terraform_unused_declarations.md)|Disallow variables, data sources, and locals that are declared but never used|✔| |
23 | 23 | |[terraform_unused_required_providers](terraform_unused_required_providers.md)|Check that all `required_providers` are used in the module|| |
24 | 24 | |[terraform_workspace_remote](terraform_workspace_remote.md)|`terraform.workspace` should not be used with a "remote" backend with remote execution|✔| |
0 commit comments