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 committed Dec 22, 2023
1 parent 4ab1fa8 commit a43e729
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 a43e729

Please sign in to comment.