Skip to content

Commit

Permalink
Add terraform_deprecated_lookup rule to the recommended preset
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 committed Sep 30, 2023
1 parent 6afcb25 commit 1f4a435
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All rules are enabled by default, but by setting `preset = "recommended"`, you c
|[terraform_comment_syntax](terraform_comment_syntax.md)|Disallow `//` comments in favor of `#`||
|[terraform_deprecated_index](terraform_deprecated_index.md)|Disallow legacy dot index syntax||
|[terraform_deprecated_interpolation](terraform_deprecated_interpolation.md)|Disallow deprecated (0.11-style) interpolation||
|[terraform_deprecated_lookup](terraform_deprecated_lookup.md)|Disallow deprecated `lookup()` function with only 2 arguments.||
|[terraform_deprecated_lookup](terraform_deprecated_lookup.md)|Disallow deprecated `lookup()` function with only 2 arguments.||
|[terraform_documented_outputs](terraform_documented_outputs.md)|Disallow `output` declarations without description||
|[terraform_documented_variables](terraform_documented_variables.md)|Disallow `variable` declarations without description||
|[terraform_empty_list_equality](terraform_empty_list_equality.md)|Disallow comparisons with `[]` when checking if a collection is empty||
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/terraform_deprecated_lookup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Disallow deprecated [`lookup` function](https://developer.hashicorp.com/terraform/language/functions/lookup) usage without a default.

> This rule is enabled by "recommended" preset.
## Example

```hcl
Expand Down
3 changes: 2 additions & 1 deletion rules/preset.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var PresetRules = map[string][]tflint.Rule{
NewTerraformCommentSyntaxRule(),
NewTerraformDeprecatedIndexRule(),
NewTerraformDeprecatedInterpolationRule(),
NewTerraformDeprecatedLookupRule(),
NewTerraformDocumentedOutputsRule(),
NewTerraformDocumentedVariablesRule(),
NewTerraformEmptyListEqualityRule(),
Expand All @@ -20,11 +21,11 @@ var PresetRules = map[string][]tflint.Rule{
NewTerraformUnusedDeclarationsRule(),
NewTerraformUnusedRequiredProvidersRule(),
NewTerraformWorkspaceRemoteRule(),
NewTerraformDeprecatedLookupRule(),
},
"recommended": {
NewTerraformDeprecatedIndexRule(),
NewTerraformDeprecatedInterpolationRule(),
NewTerraformDeprecatedLookupRule(),
NewTerraformEmptyListEqualityRule(),
NewTerraformModulePinnedSourceRule(),
NewTerraformModuleVersionRule(),
Expand Down

0 comments on commit 1f4a435

Please sign in to comment.