github.com/gettyimages/terraform@v0.7.6-0.20161219132226-dc052c5707a3/terraform/graph_config_node.go (about) 1 package terraform 2 3 import ( 4 "github.com/hashicorp/terraform/dag" 5 ) 6 7 // graphNodeConfig is an interface that all graph nodes for the 8 // configuration graph need to implement in order to build the variable 9 // dependencies properly. 10 type graphNodeConfig interface { 11 dag.NamedVertex 12 13 // All graph nodes should be dependent on other things, and able to 14 // be depended on. 15 GraphNodeDependable 16 GraphNodeDependent 17 18 // ConfigType returns the type of thing in the configuration that 19 // this node represents, such as a resource, module, etc. 20 ConfigType() GraphNodeConfigType 21 } 22 23 // GraphNodeAddressable is an interface that all graph nodes for the 24 // configuration graph need to implement in order to be be addressed / targeted 25 // properly. 26 type GraphNodeAddressable interface { 27 ResourceAddress() *ResourceAddress 28 } 29 30 // GraphNodeTargetable is an interface for graph nodes to implement when they 31 // need to be told about incoming targets. This is useful for nodes that need 32 // to respect targets as they dynamically expand. Note that the list of targets 33 // provided will contain every target provided, and each implementing graph 34 // node must filter this list to targets considered relevant. 35 type GraphNodeTargetable interface { 36 SetTargets([]ResourceAddress) 37 }