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

Method variablesNeeded

hcldec/spec.go:452–464  ·  view source on GitHub ↗

specNeedingVariables implementation

(content *hcl.BodyContent)

Source from the content-addressed store, hash-verified

450
451// specNeedingVariables implementation
452func (s *BlockListSpec) variablesNeeded(content *hcl.BodyContent) []hcl.Traversal {
453 var ret []hcl.Traversal
454
455 for _, childBlock := range content.Blocks {
456 if childBlock.Type != s.TypeName {
457 continue
458 }
459
460 ret = append(ret, Variables(childBlock.Body, s.Nested)...)
461 }
462
463 return ret
464}
465
466func (s *BlockListSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
467 var diags hcl.Diagnostics

Callers

nothing calls this directly

Calls 1

VariablesFunction · 0.70

Tested by

no test coverage detected