Deletion Protection¶
Deletion protection prevents an Omnistrate deployment instance from being deleted accidentally. When protection is enabled, delete requests are rejected until protection is disabled.
You can configure deletion protection at two levels:
- Build Plan: establishes the protection state for instances that do not have an explicit instance setting.
- Deployment instance: overrides the Build Plan setting for one instance.
How the effective setting is determined¶
An explicit instance setting always takes precedence over the Build Plan setting.
| Build Plan setting | Instance setting | Effective setting |
|---|---|---|
| Disabled | Not set | Disabled |
| Enabled | Not set | Enabled |
| Either value | Disabled | Disabled |
| Either value | Enabled | Enabled |
Build Plan changes apply immediately to both existing and new instances that do not have an instance override. Instances with an explicit override keep that value when the Build Plan changes.
For example, enabling protection on a Build Plan protects its existing instances except those where protection was explicitly disabled. If you later disable protection on the Build Plan, instances where protection was explicitly enabled remain protected.
Configure a Build Plan¶
In the Omnistrate Console, open the Build Plan and enable Delete Protection. When you disable a previously enabled plan setting, the Console asks you to confirm because unprotected instances become deletable immediately.
You can also enable the setting in a Compose specification:
Or in a Plan specification:
For the surrounding schemas, see the Compose specification and Plan specification.
Configure an instance¶
To change protection for a single instance:
- In the Omnistrate Console, open Fleet and navigate to the instance.
- Open the instance actions menu.
- Select Enable Delete Protection or Disable Delete Protection.
- Confirm the change.
This creates an explicit instance override. The instance keeps that value when the Build Plan changes; use the instance action again when you want to change its protection state.
Warning
Disabling deletion protection makes the instance eligible for immediate deletion. Deletion protection does not create a backup or snapshot. Configure deployment snapshots separately when you need recovery points.
Delete a protected instance¶
Before deleting a protected instance, disable protection from the instance actions menu. If the instance has no explicit setting and inherits protection from its Build Plan, you can either disable protection for that instance or change the Build Plan setting.