Skip to content

Commit 35a8256

Browse files
authored
rule: Pass wantType explicitly instead of map[string]string (#106)
1 parent 20e2f1b commit 35a8256

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rules/aws_resource_missing_tags.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ func (r *AwsResourceMissingTagsRule) Check(runner tflint.Runner) error {
9494
if attribute, ok := body.Attributes[tagsAttributeName]; ok {
9595
log.Printf("[DEBUG] Walk `%s` attribute", resource.Type+"."+resource.Name+"."+tagsAttributeName)
9696
resourceTags := make(map[string]string)
97-
err := runner.EvaluateExpr(attribute.Expr, &resourceTags, nil)
97+
wantType := cty.Map(cty.String)
98+
err := runner.EvaluateExpr(attribute.Expr, &resourceTags, &wantType)
9899
err = runner.EnsureNoError(err, func() error {
99100
r.emitIssueOnExpr(runner, resourceTags, config, attribute.Expr)
100101
return nil

0 commit comments

Comments
 (0)