core: Additional trace logging in attach resource config transformer

This commit is contained in:
Martin Atkins 2018-05-09 16:57:14 -07:00
parent 71d7a9e480
commit 1a9ee72ecb
1 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import (
"log"
"github.com/hashicorp/terraform/configs"
"github.com/hashicorp/terraform/dag"
)
// GraphNodeAttachResourceConfig is an interface that must be implemented by nodes
@ -41,7 +42,7 @@ func (t *AttachResourceConfigTransformer) Transform(g *Graph) error {
// Get the configuration.
config := t.Config.DescendentForInstance(addr.Module)
if config == nil {
log.Printf("[TRACE] AttachResourceConfigTransformer: %s has no configuration available", addr.String())
log.Printf("[TRACE] AttachResourceConfigTransformer: %q (%T) has no configuration available", dag.VertexName(v), v)
continue
}
@ -53,7 +54,7 @@ func (t *AttachResourceConfigTransformer) Transform(g *Graph) error {
continue
}
log.Printf("[TRACE] AttachResourceConfigTransformer: attaching to %s: %#v", addr.String(), r)
log.Printf("[TRACE] AttachResourceConfigTransformer: attaching to %q (%T) config from %s", dag.VertexName(v), v, r.DeclRange)
arn.AttachResourceConfig(r)
}
for _, r := range config.Module.DataResources {
@ -64,7 +65,7 @@ func (t *AttachResourceConfigTransformer) Transform(g *Graph) error {
continue
}
log.Printf("[TRACE] AttachResourceConfigTransformer: attaching to %s: %#v", addr.String(), r)
log.Printf("[TRACE] AttachResourceConfigTransformer: attaching to %q (%T) config from %#v", dag.VertexName(v), v, r.DeclRange)
arn.AttachResourceConfig(r)
}
}