From 513ff88859da0033bae88ba2b2929ff3463e1ca9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 26 Jan 2017 20:03:29 -0800 Subject: [PATCH] terraform: remove GraphConfigNodeType --- terraform/graph_config_node.go | 4 ---- terraform/graph_config_node_resource.go | 4 ---- terraform/graph_config_node_type.go | 16 ---------------- terraform/graph_config_node_variable.go | 4 ---- terraform/graphnodeconfigtype_string.go | 16 ---------------- terraform/transform_resource.go | 10 ---------- 6 files changed, 54 deletions(-) delete mode 100644 terraform/graph_config_node_type.go delete mode 100644 terraform/graphnodeconfigtype_string.go diff --git a/terraform/graph_config_node.go b/terraform/graph_config_node.go index 57d565ca2..189c05a29 100644 --- a/terraform/graph_config_node.go +++ b/terraform/graph_config_node.go @@ -14,10 +14,6 @@ type graphNodeConfig interface { // be depended on. GraphNodeDependable GraphNodeDependent - - // ConfigType returns the type of thing in the configuration that - // this node represents, such as a resource, module, etc. - ConfigType() GraphNodeConfigType } // GraphNodeAddressable is an interface that all graph nodes for the diff --git a/terraform/graph_config_node_resource.go b/terraform/graph_config_node_resource.go index 751652f71..a4f6361fe 100644 --- a/terraform/graph_config_node_resource.go +++ b/terraform/graph_config_node_resource.go @@ -44,10 +44,6 @@ func (n *GraphNodeConfigResource) Copy() *GraphNodeConfigResource { return ncr } -func (n *GraphNodeConfigResource) ConfigType() GraphNodeConfigType { - return GraphNodeConfigTypeResource -} - func (n *GraphNodeConfigResource) DependableName() []string { return []string{n.Resource.Id()} } diff --git a/terraform/graph_config_node_type.go b/terraform/graph_config_node_type.go deleted file mode 100644 index 42dd8dc9f..000000000 --- a/terraform/graph_config_node_type.go +++ /dev/null @@ -1,16 +0,0 @@ -package terraform - -//go:generate stringer -type=GraphNodeConfigType graph_config_node_type.go - -// GraphNodeConfigType is an enum for the type of thing that a graph -// node represents from the configuration. -type GraphNodeConfigType int - -const ( - GraphNodeConfigTypeInvalid GraphNodeConfigType = 0 - GraphNodeConfigTypeResource GraphNodeConfigType = iota - GraphNodeConfigTypeProvider - GraphNodeConfigTypeModule - GraphNodeConfigTypeOutput - GraphNodeConfigTypeVariable -) diff --git a/terraform/graph_config_node_variable.go b/terraform/graph_config_node_variable.go index 9c5f9531b..b15e09dca 100644 --- a/terraform/graph_config_node_variable.go +++ b/terraform/graph_config_node_variable.go @@ -28,10 +28,6 @@ func (n *GraphNodeConfigVariable) Name() string { return fmt.Sprintf("var.%s", n.Variable.Name) } -func (n *GraphNodeConfigVariable) ConfigType() GraphNodeConfigType { - return GraphNodeConfigTypeVariable -} - func (n *GraphNodeConfigVariable) DependableName() []string { return []string{n.Name()} } diff --git a/terraform/graphnodeconfigtype_string.go b/terraform/graphnodeconfigtype_string.go deleted file mode 100644 index 9ea0acbeb..000000000 --- a/terraform/graphnodeconfigtype_string.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by "stringer -type=GraphNodeConfigType graph_config_node_type.go"; DO NOT EDIT - -package terraform - -import "fmt" - -const _GraphNodeConfigType_name = "GraphNodeConfigTypeInvalidGraphNodeConfigTypeResourceGraphNodeConfigTypeProviderGraphNodeConfigTypeModuleGraphNodeConfigTypeOutputGraphNodeConfigTypeVariable" - -var _GraphNodeConfigType_index = [...]uint8{0, 26, 53, 80, 105, 130, 157} - -func (i GraphNodeConfigType) String() string { - if i < 0 || i >= GraphNodeConfigType(len(_GraphNodeConfigType_index)-1) { - return fmt.Sprintf("GraphNodeConfigType(%d)", i) - } - return _GraphNodeConfigType_name[_GraphNodeConfigType_index[i]:_GraphNodeConfigType_index[i+1]] -} diff --git a/terraform/transform_resource.go b/terraform/transform_resource.go index ddf26e3b1..8d58efd29 100644 --- a/terraform/transform_resource.go +++ b/terraform/transform_resource.go @@ -39,11 +39,6 @@ func (n *graphNodeExpandedResource) ResourceAddress() *ResourceAddress { } } -// graphNodeConfig impl. -func (n *graphNodeExpandedResource) ConfigType() GraphNodeConfigType { - return GraphNodeConfigTypeResource -} - // GraphNodeDependable impl. func (n *graphNodeExpandedResource) DependableName() []string { return []string{ @@ -139,11 +134,6 @@ func (n *graphNodeExpandedResourceDestroy) Name() string { return fmt.Sprintf("%s (destroy)", n.graphNodeExpandedResource.Name()) } -// graphNodeConfig impl. -func (n *graphNodeExpandedResourceDestroy) ConfigType() GraphNodeConfigType { - return GraphNodeConfigTypeResource -} - // GraphNodeEvalable impl. func (n *graphNodeExpandedResourceDestroy) EvalTree() EvalNode { info := n.instanceInfo()