Skip to content

Commit 8ed2f39

Browse files
authored
actions: don't panic if nil changes - it might be a refresh (#37687)
1 parent 51fc4c1 commit 8ed2f39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/terraform/node_action_trigger_instance_plan.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88

99
"github.com/hashicorp/hcl/v2"
10+
"github.com/zclconf/go-cty/cty"
1011

1112
"github.com/hashicorp/terraform/internal/addrs"
1213
"github.com/hashicorp/terraform/internal/configs"
@@ -17,7 +18,6 @@ import (
1718
"github.com/hashicorp/terraform/internal/plans/deferring"
1819
"github.com/hashicorp/terraform/internal/providers"
1920
"github.com/hashicorp/terraform/internal/tfdiags"
20-
"github.com/zclconf/go-cty/cty"
2121
)
2222

2323
type nodeActionTriggerPlanInstance struct {
@@ -89,7 +89,8 @@ func (n *nodeActionTriggerPlanInstance) Execute(ctx EvalContext, operation walkO
8989
}
9090

9191
if change == nil {
92-
panic("change cannot be nil")
92+
// nothing to do (this may be a refresh )
93+
return nil
9394
}
9495

9596
if n.lifecycleActionTrigger == nil {

0 commit comments

Comments
 (0)