Force delete for misconfigured scopes
Sometimes, scopes cannot be deleted normally due to configuration errors that are considered "unfixable". This can happen in cases where the system cannot guarantee successful deletion, such as when:
- authentication credentials have expired.
- a provider is misconfigured, such as with GCP.
- a request to create a scope fails.
In such cases, you can use the force
query parameter. This option allows you to retry deleting a scope after a previous attempt has failed. When enabled, the system will attempt to remove the scope by bypassing the checks that caused the failure.
Considerations
- The option becomes available after you've attempted to delete the scope using a standard delete request and that attempt has failed.
- The approvals process is not bypassed when performing a force delete. All approval workflows and policies will proceed as usual and won't be skipped.
- Residual infrastructure: When using force delete, there's a possibility that some infrastructure components may remain if they couldn’t be successfully deleted in previous attempts.
How it works
- If a standard delete operation fails, the
force
option becomes available. - When you include
force=true
in your delete request, the system attempts to delete the scope again, ignoring conditions that blocked the initial attempt.
Force deleting scopes using the API
You need an Ops role to use force delete on a scope.
1. Send the request
Send a DELETE request to remove a scope.
curl -L -X DELETE 'https://api.nullplatform.com/scope/:id?force=true'
where:
id
: the unique identifier of the scope to delete.force=true
: enables force deletion of the scope.
If the request is successful, you will receive a 200 OK response.
2. Verify the scope is deleted
Send a GET request to check the status of the scope.
curl -L 'https://api.nullplatform.com/scope/:id' \
-H 'Accept: application/json'
where:
id
: the unique identifier of the scope to verify.
You'll receive a response with status: "deleted"
, confirming that the misconfigured scope has been successfully removed.