terraform: more logs

This commit is contained in:
Mitchell Hashimoto 2014-07-24 07:20:59 -07:00
parent 3acb7dc154
commit b51d18f1de
2 changed files with 9 additions and 0 deletions

View File

@ -121,7 +121,9 @@ func (c *Context) Apply() (*State, error) {
c.state = c.state.deepcopy()
// Walk
log.Printf("[INFO] Apply walk starting")
err = g.Walk(c.applyWalkFn())
log.Printf("[INFO] Apply walk complete")
// Prune the state so that we have as clean a state as possible
c.state.prune()

View File

@ -3,6 +3,7 @@ package terraform
import (
"errors"
"fmt"
"log"
"sort"
"strings"
@ -100,6 +101,8 @@ func Graph(opts *GraphOpts) (*depgraph.Graph, error) {
return nil, errors.New("Config is required for Graph")
}
log.Printf("[DEBUG] Creating graph...")
g := new(depgraph.Graph)
// First, build the initial resource graph. This only has the resources
@ -160,6 +163,10 @@ func Graph(opts *GraphOpts) (*depgraph.Graph, error) {
return nil, err
}
log.Printf(
"[DEBUG] Graph created and valid. %d nouns.",
len(g.Nouns))
return g, nil
}