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

Method EvalContext

ext/dynblock/iteration.go:34–46  ·  view source on GitHub ↗
(base *hcl.EvalContext)

Source from the content-addressed store, hash-verified

32}
33
34func (i *iteration) EvalContext(base *hcl.EvalContext) *hcl.EvalContext {
35 new := base.NewChild()
36
37 if i != nil {
38 new.Variables = map[string]cty.Value{}
39 for name, otherIt := range i.Inherited {
40 new.Variables[name] = otherIt.Object()
41 }
42 new.Variables[i.IteratorName] = i.Object()
43 }
44
45 return new
46}
47
48func (i *iteration) MakeChild(iteratorName string, key, value cty.Value) *iteration {
49 if i == nil {

Callers 3

ValueMethod · 0.80
expandChildMethod · 0.80
newBlockMethod · 0.80

Calls 2

ObjectMethod · 0.95
NewChildMethod · 0.80

Tested by

no test coverage detected