diff --git a/internal/configs/action.go b/internal/configs/action.go index f146ed36ca..46d9de39fa 100644 --- a/internal/configs/action.go +++ b/internal/configs/action.go @@ -129,25 +129,11 @@ func decodeActionTriggerBlock(block *hcl.Block) (*ActionTrigger, hcl.Diagnostics event = BeforeUpdate case "after_update": event = AfterUpdate - case "before_destroy": - event = BeforeDestroy - case "after_destroy": - event = AfterDestroy default: diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagError, Summary: fmt.Sprintf("Invalid \"event\" value %s", hcl.ExprAsKeyword(expr)), - Detail: "The \"event\" argument supports the following values: before_create, after_create, before_update, after_update, before_destroy, after_destroy.", - Subject: expr.Range().Ptr(), - }) - continue - } - - if event == BeforeDestroy || event == AfterDestroy { - diags = append(diags, &hcl.Diagnostic{ - Severity: hcl.DiagError, - Summary: "Invalid destroy event used", - Detail: "The destroy events (before_destroy, after_destroy) are not supported as of right now. They will be supported in a future release.", + Detail: "The \"event\" argument supports the following values: before_create, after_create, before_update, after_update.", Subject: expr.Range().Ptr(), }) continue diff --git a/internal/configs/action_test.go b/internal/configs/action_test.go index 41078e4752..e1e3257ab3 100644 --- a/internal/configs/action_test.go +++ b/internal/configs/action_test.go @@ -250,7 +250,7 @@ func TestDecodeActionTriggerBlock(t *testing.T) { }, }, []string{ - "MockExprTraversal:0,0-12: Invalid \"event\" value not_an_event; The \"event\" argument supports the following values: before_create, after_create, before_update, after_update, before_destroy, after_destroy.", + "MockExprTraversal:0,0-12: Invalid \"event\" value not_an_event; The \"event\" argument supports the following values: before_create, after_create, before_update, after_update.", ":0,0-0: No events specified; At least one event must be specified for an action_trigger.", }, },