@@ -66,7 +66,7 @@ func (t *TargetsTransformer) selectTargetedNodes(g *Graph, addrs []addrs.Targeta
6666 // We need to add everything this node depends on or that is closely associated with
6767 // this node. In case of resource nodes, action triggers are considered closely related
6868 // since they belong to the resource.
69- t .addDependencies (g , v , targetedNodes , addrs )
69+ t .addVertexDependenciesToTargetedNodes (g , v , targetedNodes , addrs )
7070
7171 // We inform nodes that ask about the list of targets - helps for nodes
7272 // that need to dynamically expand. Note that this only occurs for nodes
@@ -138,26 +138,27 @@ func (t *TargetsTransformer) selectTargetedNodes(g *Graph, addrs []addrs.Targeta
138138 return targetedNodes
139139}
140140
141- // addDependencies adds dependencies of the targeted vertex. This includes all ancestors in the
142- // graph. It also includes all action trigger nodes in the graph. Actions are planned after the
141+ // addVertexDependenciesToTargetedNodes adds dependencies of the targeted vertex to the
142+ // targetedNodes set. This includes all ancestors in the graph.
143+ // It also includes all action trigger nodes in the graph. Actions are planned after the
143144// triggering node has planned so that we can ensure the actions are only planned if the triggering
144145// resource has an action (Create / Update) corresponding to one of the events in the action trigger
145146// blocks event list.
146- func (t * TargetsTransformer ) addDependencies (g * Graph , v dag.Vertex , targetedNodes dag.Set , addrs []addrs.Targetable ) {
147+ func (t * TargetsTransformer ) addVertexDependenciesToTargetedNodes (g * Graph , v dag.Vertex , targetedNodes dag.Set , addrs []addrs.Targetable ) {
147148 if targetedNodes .Include (v ) {
148149 return
149150 }
150151 targetedNodes .Add (v )
151152
152153 for _ , d := range g .Ancestors (v ) {
153- t .addDependencies (g , d , targetedNodes , addrs )
154+ t .addVertexDependenciesToTargetedNodes (g , d , targetedNodes , addrs )
154155 }
155156
156157 if _ , ok := v .(* nodeExpandPlannableResource ); ok {
157158 // We want to also add the action triggers related to this resource
158159 for _ , d := range g .Children (v ) {
159160 if _ , ok := d .(* nodeActionTriggerPlanExpand ); ok {
160- t .addDependencies (g , d , targetedNodes , addrs )
161+ t .addVertexDependenciesToTargetedNodes (g , d , targetedNodes , addrs )
161162 }
162163 }
163164 }
@@ -167,7 +168,7 @@ func (t *TargetsTransformer) addDependencies(g *Graph, v dag.Vertex, targetedNod
167168 if _ , ok := v .(* NodeApplyableResourceInstance ); ok {
168169 for _ , f := range g .Children (v ) {
169170 if _ , ok := f .(* nodeActionTriggerApply ); ok {
170- t .addDependencies (g , f , targetedNodes , addrs )
171+ t .addVertexDependenciesToTargetedNodes (g , f , targetedNodes , addrs )
171172 }
172173 }
173174 }
0 commit comments