@@ -270,7 +270,7 @@ func (ctx *BuiltinEvalContext) CloseProvisioners() error {
270270
271271func (ctx * BuiltinEvalContext ) EvaluateBlock (body hcl.Body , schema * configschema.Block , self addrs.Referenceable , keyData InstanceKeyEvalData ) (cty.Value , hcl.Body , tfdiags.Diagnostics ) {
272272 var diags tfdiags.Diagnostics
273- scope := ctx .EvaluationScope (self , keyData )
273+ scope := ctx .EvaluationScope (self , nil , keyData )
274274 body , evalDiags := scope .ExpandBlock (body , schema )
275275 diags = diags .Append (evalDiags )
276276 val , evalDiags := scope .EvalBlock (body , schema )
@@ -279,7 +279,7 @@ func (ctx *BuiltinEvalContext) EvaluateBlock(body hcl.Body, schema *configschema
279279}
280280
281281func (ctx * BuiltinEvalContext ) EvaluateExpr (expr hcl.Expression , wantType cty.Type , self addrs.Referenceable ) (cty.Value , tfdiags.Diagnostics ) {
282- scope := ctx .EvaluationScope (self , EvalDataForNoInstanceKey )
282+ scope := ctx .EvaluationScope (self , nil , EvalDataForNoInstanceKey )
283283 return scope .EvalExpr (expr , wantType )
284284}
285285
@@ -397,7 +397,7 @@ func (ctx *BuiltinEvalContext) EvaluateReplaceTriggeredBy(expr hcl.Expression, r
397397 return ref , replace , diags
398398}
399399
400- func (ctx * BuiltinEvalContext ) EvaluationScope (self addrs.Referenceable , keyData instances. RepetitionData ) * lang.Scope {
400+ func (ctx * BuiltinEvalContext ) EvaluationScope (self addrs.Referenceable , source addrs. Referenceable , keyData InstanceKeyEvalData ) * lang.Scope {
401401 if ! ctx .pathSet {
402402 panic ("context path not set" )
403403 }
@@ -407,7 +407,7 @@ func (ctx *BuiltinEvalContext) EvaluationScope(self addrs.Referenceable, keyData
407407 InstanceKeyData : keyData ,
408408 Operation : ctx .Evaluator .Operation ,
409409 }
410- scope := ctx .Evaluator .Scope (data , self )
410+ scope := ctx .Evaluator .Scope (data , self , source )
411411
412412 // ctx.PathValue is the path of the module that contains whatever
413413 // expression the caller will be trying to evaluate, so this will
0 commit comments