4 "github.com/hashicorp/terraform/dag"
7 // ValidateGraphBuilder creates the graph for the validate operation.
9 // ValidateGraphBuilder is based on the PlanGraphBuilder. We do this so that
10 // we only have to validate what we'd normally plan anyways. The
11 // PlanGraphBuilder given will be modified so it shouldn't be used for anything
12 // else after calling this function.
13 func ValidateGraphBuilder(p *PlanGraphBuilder) GraphBuilder {
14 // We're going to customize the concrete functions
15 p.CustomConcrete = true
17 // Set the provider to the normal provider. This will ask for input.
18 p.ConcreteProvider = func(a *NodeAbstractProvider) dag.Vertex {
19 return &NodeApplyableProvider{
20 NodeAbstractProvider: a,
24 p.ConcreteResource = func(a *NodeAbstractResource) dag.Vertex {
25 return &NodeValidatableResource{
26 NodeAbstractCountResource: &NodeAbstractCountResource{
27 NodeAbstractResource: a,
32 // We purposely don't set any other concrete types since they don't
33 // require validation.