From 4b3473e5222f6ac5ae3f8454492f4be22ab17274 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 26 Sep 2014 10:10:08 -0700 Subject: [PATCH] terraform: fix compilation from merge --- terraform/context.go | 4 ++-- terraform/context_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/terraform/context.go b/terraform/context.go index 22ff57cec4..28dd0d5f96 100644 --- a/terraform/context.go +++ b/terraform/context.go @@ -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 { diff --git a/terraform/context_test.go b/terraform/context_test.go index acb8d0367e..25cb94e745 100644 --- a/terraform/context_test.go +++ b/terraform/context_test.go @@ -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), },