terraform: fix compilation from merge

This commit is contained in:
Mitchell Hashimoto 2014-09-26 10:10:08 -07:00
parent 0d1867c0b3
commit 4b3473e522
2 changed files with 5 additions and 5 deletions

View File

@ -551,8 +551,8 @@ func (c *walkContext) applyWalkFn() depgraph.WalkFunc {
// was an error during the provider apply.
tainted := false
if applyerr == nil && createNew && len(r.Provisioners) > 0 {
for _, h := range c.hooks {
handleHook(h.PreProvisionResource(r.Id, is))
for _, h := range c.Context.hooks {
handleHook(h.PreProvisionResource(r.Info, is))
}
if err := c.applyProvisioners(r, is); err != nil {

View File

@ -797,7 +797,7 @@ func TestContextApply_provisionerResourceRef(t *testing.T) {
// Provisioner should NOT run on a diff, only create
func TestContextApply_Provisioner_Diff(t *testing.T) {
c := testConfig(t, "apply-provisioner-diff")
m := testModule(t, "apply-provisioner-diff")
p := testProvider("aws")
pr := testProvisioner()
p.ApplyFn = testApplyFn
@ -806,7 +806,7 @@ func TestContextApply_Provisioner_Diff(t *testing.T) {
return nil
}
ctx := testContext(t, &ContextOpts{
Config: c,
Module: m,
Providers: map[string]ResourceProviderFactory{
"aws": testProviderFuncFixed(p),
},
@ -842,7 +842,7 @@ func TestContextApply_Provisioner_Diff(t *testing.T) {
// Re-create context with state
ctx = testContext(t, &ContextOpts{
Config: c,
Module: m,
Providers: map[string]ResourceProviderFactory{
"aws": testProviderFuncFixed(p),
},