actions: don't panic if nil changes - it might be a refresh (#37687)

pull/37694/head
Kristin Laemmert 8 months ago committed by GitHub
parent 51fc4c161f
commit 8ed2f39087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,6 +7,7 @@ import (
"fmt"
"github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/configs"
@ -17,7 +18,6 @@ import (
"github.com/hashicorp/terraform/internal/plans/deferring"
"github.com/hashicorp/terraform/internal/providers"
"github.com/hashicorp/terraform/internal/tfdiags"
"github.com/zclconf/go-cty/cty"
)
type nodeActionTriggerPlanInstance struct {
@ -89,7 +89,8 @@ func (n *nodeActionTriggerPlanInstance) Execute(ctx EvalContext, operation walkO
}
if change == nil {
panic("change cannot be nil")
// nothing to do (this may be a refresh )
return nil
}
if n.lifecycleActionTrigger == nil {

Loading…
Cancel
Save