Skip to content

Commit

Permalink
Use resource range rather than rereading from body
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidaguerre committed Sep 19, 2023
1 parent 6744f6d commit 9547dd3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/steampipeconfig/parse/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,7 @@ func handleModDecodeResult(resource modconfig.HclResource, res *DecodeResult, bl

// if resource supports metadata, save it
if resourceWithMetadata, ok := resource.(modconfig.ResourceWithMetadata); ok {
body := block.Body.(*hclsyntax.Body)
moreDiags = addResourceMetadata(resourceWithMetadata, body.SrcRange, parseCtx)
moreDiags = addResourceMetadata(resourceWithMetadata, resource.GetHclResourceImpl().DeclRange, parseCtx)
res.addDiags(moreDiags)
}
}
Expand Down

0 comments on commit 9547dd3

Please sign in to comment.