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

Method variablesNeeded

hcldec/spec.go:900–912  ·  view source on GitHub ↗

specNeedingVariables implementation

(content *hcl.BodyContent)

Source from the content-addressed store, hash-verified

898
899// specNeedingVariables implementation
900func (s *BlockMapSpec) variablesNeeded(content *hcl.BodyContent) []hcl.Traversal {
901 var ret []hcl.Traversal
902
903 for _, childBlock := range content.Blocks {
904 if childBlock.Type != s.TypeName {
905 continue
906 }
907
908 ret = append(ret, Variables(childBlock.Body, s.Nested)...)
909 }
910
911 return ret
912}
913
914func (s *BlockMapSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
915 var diags hcl.Diagnostics

Callers

nothing calls this directly

Calls 1

VariablesFunction · 0.70

Tested by

no test coverage detected