From 2423d135acb82c6100b354890f0fc35bddea71cb Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Wed, 9 Jul 2014 14:48:25 -0700 Subject: [PATCH] terraform: Move the config initialization of provisioners --- terraform/context.go | 8 -------- terraform/graph.go | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/terraform/context.go b/terraform/context.go index 308ea91274..8b1b5c21d9 100644 --- a/terraform/context.go +++ b/terraform/context.go @@ -814,14 +814,6 @@ func (c *Context) genericWalkFn(cb genericWalkFunc) depgraph.WalkFunc { } else { rn.Resource.Config = NewResourceConfig(rn.Config.RawConfig) } - - for _, prov := range rn.Resource.Provisioners { - if prov.RawConfig == nil { - prov.Config = new(ResourceConfig) - } else { - prov.Config = NewResourceConfig(prov.RawConfig) - } - } } else { rn.Resource.Config = nil } diff --git a/terraform/graph.go b/terraform/graph.go index d1fdf43c68..445d9e99d2 100644 --- a/terraform/graph.go +++ b/terraform/graph.go @@ -772,6 +772,7 @@ func graphMapResourceProvisioners(g *depgraph.Graph, // Save the provisioner rn.Resource.Provisioners = append(rn.Resource.Provisioners, &ResourceProvisionerConfig{ Provisioner: provisioner, + Config: NewResourceConfig(p.RawConfig), RawConfig: p.RawConfig, }) }