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 {
|
} else {
|
||||||
rn.Resource.Config = NewResourceConfig(rn.Config.RawConfig)
|
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 {
|
} else {
|
||||||
rn.Resource.Config = nil
|
rn.Resource.Config = nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -772,6 +772,7 @@ func graphMapResourceProvisioners(g *depgraph.Graph,
|
||||||
// Save the provisioner
|
// Save the provisioner
|
||||||
rn.Resource.Provisioners = append(rn.Resource.Provisioners, &ResourceProvisionerConfig{
|
rn.Resource.Provisioners = append(rn.Resource.Provisioners, &ResourceProvisionerConfig{
|
||||||
Provisioner: provisioner,
|
Provisioner: provisioner,
|
||||||
|
Config: NewResourceConfig(p.RawConfig),
|
||||||
RawConfig: p.RawConfig,
|
RawConfig: p.RawConfig,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue