mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
97bb7cb65c
Allow module variables to fail interpolation during input. This is OK since they will be verified again during Plan. Because Input happens before Refresh, module variable interpolation can fail when referencing values that aren't yet in the state, but are expected after Refresh.
31 lines
854 B
Go
31 lines
854 B
Go
package terraform
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform/dag"
|
|
)
|
|
|
|
// InputGraphBuilder creates the graph for the input operation.
|
|
//
|
|
// Unlike other graph builders, this is a function since it currently modifies
|
|
// and is based on the PlanGraphBuilder. The PlanGraphBuilder passed in will be
|
|
// modified and should not be used for any other operations.
|
|
func InputGraphBuilder(p *PlanGraphBuilder) GraphBuilder {
|
|
// convert this to an InputPlan
|
|
p.Input = true
|
|
|
|
// We're going to customize the concrete functions
|
|
p.CustomConcrete = true
|
|
|
|
// Set the provider to the normal provider. This will ask for input.
|
|
p.ConcreteProvider = func(a *NodeAbstractProvider) dag.Vertex {
|
|
return &NodeApplyableProvider{
|
|
NodeAbstractProvider: a,
|
|
}
|
|
}
|
|
|
|
// We purposely don't set any more concrete fields since the remainder
|
|
// should be no-ops.
|
|
|
|
return p
|
|
}
|