From 3b7c987889172cca4a943e9ed14472a5e154f9d4 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Thu, 18 Sep 2014 13:33:05 -0700 Subject: [PATCH] terraform: EncodeDepedencies should override dep list --- terraform/context_test.go | 9 --------- terraform/graph.go | 8 ++------ 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/terraform/context_test.go b/terraform/context_test.go index a31b0ec15..780815bbb 100644 --- a/terraform/context_test.go +++ b/terraform/context_test.go @@ -2252,15 +2252,6 @@ func testApplyFn( if d != nil { result = result.MergeDiff(d) } - - // TODO(armon): commenting this out to compile, but you're in the - // process of removing this, too anyways. Remove when safe. - /* - if depAttr, ok := d.Attributes["dep"]; ok { - result.Dependencies = []string{depAttr.New} - } - */ - return result, nil } diff --git a/terraform/graph.go b/terraform/graph.go index 303a638f4..65fcef650 100644 --- a/terraform/graph.go +++ b/terraform/graph.go @@ -209,12 +209,8 @@ func EncodeDependencies(g *depgraph.Graph) { } } - // Inject any of the missing depedencies - for _, dep := range inject { - if !strSliceContains(state.Dependencies, dep) { - state.Dependencies = append(state.Dependencies, dep) - } - } + // Update the dependencies + state.Dependencies = inject } }