terraform: add way to toggle the graphs to use for apply

This commit is contained in:
Mitchell Hashimoto 2016-09-14 20:59:02 -07:00
parent 11578f0792
commit b2ef4e9ac0
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,11 @@ import (
// is called on Context.
type InputMode byte
var (
// NOTE: Internal only to toggle between the new and old apply graph
newApplyGraph = false
)
const (
// InputModeVar asks for all variables
InputModeVar InputMode = 1 << iota
@ -358,7 +363,7 @@ func (c *Context) Apply() (*State, error) {
// our new graph builder.
var graph *Graph
var err error
if c.destroy {
if c.destroy || !newApplyGraph {
graph, err = c.Graph(&ContextGraphOpts{Validate: true})
} else {
graph, err = (&ApplyGraphBuilder{