From f4c867af24c8cdd7f6dceb06f7241a575fd8e122 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Fri, 22 Dec 2023 16:56:14 +0700 Subject: [PATCH] fix(terraform): fix reference extraction from TupleConsExpr --- pkg/terraform/attribute.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/terraform/attribute.go b/pkg/terraform/attribute.go index 5d9258a73..856bec184 100644 --- a/pkg/terraform/attribute.go +++ b/pkg/terraform/attribute.go @@ -987,8 +987,10 @@ func (a *Attribute) referencesFromExpression(expression hcl.Expression) []*Refer refs = append(refs, ref) } case *hclsyntax.TupleConsExpr: - if ref, err := createDotReferenceFromTraversal(a.module, t.Variables()...); err == nil { - refs = append(refs, ref) + for _, v := range t.Variables() { + if ref, err := createDotReferenceFromTraversal(a.module, v); err == nil { + refs = append(refs, ref) + } } case *hclsyntax.RelativeTraversalExpr: switch s := t.Source.(type) {