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

Method variablesNeeded

hcldec/spec.go:738–750  ·  view source on GitHub ↗

specNeedingVariables implementation

(content *hcl.BodyContent)

Source from the content-addressed store, hash-verified

736
737// specNeedingVariables implementation
738func (s *BlockSetSpec) variablesNeeded(content *hcl.BodyContent) []hcl.Traversal {
739 var ret []hcl.Traversal
740
741 for _, childBlock := range content.Blocks {
742 if childBlock.Type != s.TypeName {
743 continue
744 }
745
746 ret = append(ret, Variables(childBlock.Body, s.Nested)...)
747 }
748
749 return ret
750}
751
752func (s *BlockSetSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
753 var diags hcl.Diagnostics

Callers

nothing calls this directly

Calls 1

VariablesFunction · 0.70

Tested by

no test coverage detected