Documentation
¶
Index ¶
Constants ¶
const BlockLocals = "locals"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct{}
Processor processes local declarations in a block. This is the workhorse of the evaluator. It computes dependencies across local variables and evaluates them in dependency order checking for circularity. Given an eval context, it checks whether there is any expression that relies on an unknown local or on other unknown values in the eval context and produces an error if that is the case. At the end of processing, it returns a child context with the locals having computed values. Note that "computed" does not mean "complete" - locals may have incomplete values if they refer to resource properties that are not yet known.
func (*Processor) Expressions ¶
func (l *Processor) Expressions(content *hcl.BodyContent) (map[string]hcl.Expression, hcl.Diagnostics)
Expressions returns expressions keyed by local name under the supplied content.
func (*Processor) Process ¶
func (l *Processor) Process(ctx *hcl.EvalContext, content *hcl.BodyContent) (*hcl.EvalContext, hcl.Diagnostics)
Process processes all local blocks found in the supplied body contents as a single unit and returns a child context which has values for all locals.