mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-22 19:24:37 -05:00
Previously the PlanGlue methods all took PlanningOracle pointers as one of their arguments, which is annoying since all of them should end up with pointers to the same object and it makes it hard for the PlanGlue implementation to do any work outside of and between the PlanGlue method calls. Instead then we'll have DrivePlanning take a function for building a PlanGlue implementation given a PlanningOracle pointer, and then the planning engine returns an implementation that binds a planContext to a PlanningOracle it can then use to do all of its work. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
23 lines
658 B
Go
23 lines
658 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package planning
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/opentofu/opentofu/internal/lang/eval"
|
|
"github.com/opentofu/opentofu/internal/tfdiags"
|
|
"github.com/zclconf/go-cty/cty"
|
|
)
|
|
|
|
func (p *planGlue) planDesiredEphemeralResourceInstance(ctx context.Context, inst *eval.DesiredResourceInstance) (cty.Value, tfdiags.Diagnostics) {
|
|
// Regardless of outcome we'll always report that we completed planning.
|
|
defer p.planCtx.reportResourceInstancePlanCompletion(inst.Addr)
|
|
|
|
// TODO: Implement
|
|
panic("unimplemented")
|
|
}
|