terraform: add way to toggle the graphs to use for apply
This commit is contained in:
parent
11578f0792
commit
b2ef4e9ac0
|
@ -17,6 +17,11 @@ import (
|
||||||
// is called on Context.
|
// is called on Context.
|
||||||
type InputMode byte
|
type InputMode byte
|
||||||
|
|
||||||
|
var (
|
||||||
|
// NOTE: Internal only to toggle between the new and old apply graph
|
||||||
|
newApplyGraph = false
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// InputModeVar asks for all variables
|
// InputModeVar asks for all variables
|
||||||
InputModeVar InputMode = 1 << iota
|
InputModeVar InputMode = 1 << iota
|
||||||
|
@ -358,7 +363,7 @@ func (c *Context) Apply() (*State, error) {
|
||||||
// our new graph builder.
|
// our new graph builder.
|
||||||
var graph *Graph
|
var graph *Graph
|
||||||
var err error
|
var err error
|
||||||
if c.destroy {
|
if c.destroy || !newApplyGraph {
|
||||||
graph, err = c.Graph(&ContextGraphOpts{Validate: true})
|
graph, err = c.Graph(&ContextGraphOpts{Validate: true})
|
||||||
} else {
|
} else {
|
||||||
graph, err = (&ApplyGraphBuilder{
|
graph, err = (&ApplyGraphBuilder{
|
||||||
|
|
Loading…
Reference in New Issue