From dfb5be241363f6ce21b1e0e71b465560cf1f22c5 Mon Sep 17 00:00:00 2001 From: Chris Marchesi Date: Sat, 29 Apr 2017 12:08:04 -0700 Subject: [PATCH] Rename NodeRefreshableResource to NodeRefreshableResourceInstance In prep for NodeRefreshableResource becoming an NodeAbstractCountResource and implementing GraphNodeDynamicExpandable. --- terraform/graph_builder_refresh.go | 2 +- terraform/node_resource_refresh.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/terraform/graph_builder_refresh.go b/terraform/graph_builder_refresh.go index 88ae3380c4..3acba002d0 100644 --- a/terraform/graph_builder_refresh.go +++ b/terraform/graph_builder_refresh.go @@ -57,7 +57,7 @@ func (b *RefreshGraphBuilder) Steps() []GraphTransformer { } concreteResource := func(a *NodeAbstractResource) dag.Vertex { - return &NodeRefreshableResource{ + return &NodeRefreshableResourceInstance{ NodeAbstractResource: a, } } diff --git a/terraform/node_resource_refresh.go b/terraform/node_resource_refresh.go index 3a44926cef..a6788eb121 100644 --- a/terraform/node_resource_refresh.go +++ b/terraform/node_resource_refresh.go @@ -6,19 +6,19 @@ import ( "github.com/hashicorp/terraform/config" ) -// NodeRefreshableResource represents a resource that is "applyable": +// NodeRefreshableResourceInstance represents a resource that is "applyable": // it is ready to be applied and is represented by a diff. -type NodeRefreshableResource struct { +type NodeRefreshableResourceInstance struct { *NodeAbstractResource } // GraphNodeDestroyer -func (n *NodeRefreshableResource) DestroyAddr() *ResourceAddress { +func (n *NodeRefreshableResourceInstance) DestroyAddr() *ResourceAddress { return n.Addr } // GraphNodeEvalable -func (n *NodeRefreshableResource) EvalTree() EvalNode { +func (n *NodeRefreshableResourceInstance) EvalTree() EvalNode { // Eval info is different depending on what kind of resource this is switch mode := n.Addr.Mode; mode { case config.ManagedResourceMode: @@ -44,7 +44,7 @@ func (n *NodeRefreshableResource) EvalTree() EvalNode { } } -func (n *NodeRefreshableResource) evalTreeManagedResource() EvalNode { +func (n *NodeRefreshableResourceInstance) evalTreeManagedResource() EvalNode { addr := n.NodeAbstractResource.Addr // stateId is the ID to put into the state