Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deferred actions: add common functionality for evaluating unexpanded and expanded modules #35009

Merged
merged 3 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading