You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If the action is not a recreate or a delete as part of destroy - skip checking for prevent destroy
59
-
// We allow delete as part of deploy though (hence isDestroy check) because we mimic the behavior of terraform which allows such resources to be removed from config.
returnfmt.Errorf("resource %s has lifecycle.prevent_destroy set, but the plan calls for this resource to be recreated or destroyed. To avoid this error, disable lifecycle.prevent_destroy for %s.%s", action.Key, action.Group, action.Key)
76
-
}
69
+
preventDestroy, ok:=preventDestroyV.AsBool()
70
+
if!ok {
71
+
returnfmt.Errorf("internal error: prevent_destroy is not a boolean for %s.%s", action.Group, action.Key)
72
+
}
73
+
ifpreventDestroy {
74
+
returnfmt.Errorf("resource %s has lifecycle.prevent_destroy set, but the plan calls for this resource to be recreated or destroyed. To avoid this error, disable lifecycle.prevent_destroy for %s.%s", action.Key, action.Group, action.Key)
0 commit comments