MCPcopy
hub / github.com/hashicorp/hcl / variablesNeeded

Method variablesNeeded

hcldec/spec.go:615–627  ·  view source on GitHub ↗

specNeedingVariables implementation

(content *hcl.BodyContent)

Source from the content-addressed store, hash-verified

613
614// specNeedingVariables implementation
615func (s *BlockTupleSpec) variablesNeeded(content *hcl.BodyContent) []hcl.Traversal {
616 var ret []hcl.Traversal
617
618 for _, childBlock := range content.Blocks {
619 if childBlock.Type != s.TypeName {
620 continue
621 }
622
623 ret = append(ret, Variables(childBlock.Body, s.Nested)...)
624 }
625
626 return ret
627}
628
629func (s *BlockTupleSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
630 var diags hcl.Diagnostics

Callers

nothing calls this directly

Calls 1

VariablesFunction · 0.70

Tested by

no test coverage detected