Skip to content

Commit 0031dcc

Browse files
refactor: rename targets to action targets
1 parent 231b801 commit 0031dcc

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

internal/terraform/graph_builder_plan.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer {
168168
&ActionTriggerConfigTransformer{
169169
Config: b.Config,
170170
Operation: b.Operation,
171-
Targets: b.ActionTargets,
171+
ActionTargets: b.ActionTargets,
172172
queryPlanMode: b.queryPlan,
173173
},
174174

175175
&ActionInvokeTransformer{
176176
Config: b.Config,
177177
Operation: b.Operation,
178-
Targets: b.ActionTargets,
178+
ActionTargets: b.ActionTargets,
179179
queryPlanMode: b.queryPlan,
180180
},
181181

internal/terraform/transform_action_invoke.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ import (
1111
)
1212

1313
type ActionInvokeTransformer struct {
14-
Config *configs.Config
15-
Targets []addrs.Targetable
16-
Operation walkOperation
14+
Config *configs.Config
15+
ActionTargets []addrs.Targetable
16+
Operation walkOperation
1717

1818
queryPlanMode bool
1919
}
2020

2121
func (t *ActionInvokeTransformer) Transform(g *Graph) error {
22-
if t.Operation != walkPlan || t.queryPlanMode || len(t.Targets) == 0 {
22+
if t.Operation != walkPlan || t.queryPlanMode || len(t.ActionTargets) == 0 {
2323
return nil
2424
}
2525

2626
// Then we're invoking and we're just going to include the actions that
2727
// have been specifically asked for.
28-
for _, target := range t.Targets {
28+
for _, target := range t.ActionTargets {
2929
var config *configs.Action
3030
switch target := target.(type) {
3131
case addrs.AbsAction:

internal/terraform/transform_action_trigger_config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ import (
1313
)
1414

1515
type ActionTriggerConfigTransformer struct {
16-
Config *configs.Config
17-
Targets []addrs.Targetable
18-
Operation walkOperation
16+
Config *configs.Config
17+
ActionTargets []addrs.Targetable
18+
Operation walkOperation
1919

2020
queryPlanMode bool
2121
}
2222

2323
func (t *ActionTriggerConfigTransformer) Transform(g *Graph) error {
2424
// We don't want to run if we are using the query plan mode or have targets in place
25-
if t.Operation != walkPlan || t.queryPlanMode || len(t.Targets) > 0 {
25+
if t.Operation != walkPlan || t.queryPlanMode || len(t.ActionTargets) > 0 {
2626
return nil
2727
}
2828

0 commit comments

Comments
 (0)