Skip to content

Commit

Permalink
fix(terraform): fix reference extraction from TupleConsExpr
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpivkin authored and simar7 committed Jan 10, 2024
1 parent 0e6db3c commit f4c867a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/terraform/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f4c867a

Please sign in to comment.