terraform: Move the config initialization of provisioners
This commit is contained in:
parent
1c4321a503
commit
2423d135ac
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue