Skip to content

Commit

Permalink
deferred actions: add common functionality for evaluating unexpanded …
Browse files Browse the repository at this point in the history
…and expanded modules
  • Loading branch information
liamcervante committed Apr 19, 2024
1 parent 2b6af4a commit ab6a8b5
Show file tree
Hide file tree
Showing 6 changed files with 974 additions and 959 deletions.
10 changes: 8 additions & 2 deletions internal/terraform/eval_context_builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ func (ctx *BuiltinEvalContext) EvaluationScope(self addrs.Referenceable, source
switch scope := ctx.scope.(type) {
case evalContextModuleInstance:
data := &evaluationStateData{
Evaluator: ctx.Evaluator,
evaluationData: &evaluationData{
Evaluator: ctx.Evaluator,
Module: scope.Addr.Module(),
},
ModulePath: scope.Addr,
InstanceKeyData: keyData,
Operation: ctx.Evaluator.Operation,
Expand All @@ -460,7 +463,10 @@ func (ctx *BuiltinEvalContext) EvaluationScope(self addrs.Referenceable, source
return evalScope
case evalContextPartialExpandedModule:
data := &evaluationPlaceholderData{
Evaluator: ctx.Evaluator,
evaluationData: &evaluationData{
Evaluator: ctx.Evaluator,
Module: scope.Addr.Module(),
},
ModulePath: scope.Addr,
CountAvailable: keyData.CountIndex != cty.NilVal,
EachAvailable: keyData.EachKey != cty.NilVal,
Expand Down
Loading

0 comments on commit ab6a8b5

Please sign in to comment.