Delete a File
In this guide, you will delete a Guardrails File using the console UI. Deleting a file is permanent: the file and all its data are removed from Guardrails. Any calculated policies that reference the deleted file will receive null data on their next evaluation, which may cause policy errors.
Prerequisites
- Access to the Guardrails console with
Turbot/AdminorTurbot/Ownerpermissions. - The file you want to delete.
[!CAUTION] Before deleting a file, verify that no calculated policies reference it. Policies that query a deleted file via
resource(id: "file_aka")will receivenulldata, which may cause the template to produce unexpected results or errors.
Step 1: Navigate to the File
Find the file you want to delete. Navigate to it from the parent folder's Resources tab, or search for it in the Resources page.
Step 2: Open the Delete Dialog
On the file's detail page, click Actions in the top-right corner and select Remove from Turbot. The Remove File ... from Turbot CMDB? confirmation dialog opens.

The dialog explains that the action removes the file from Guardrails and asks you to type the file's full name to confirm.
Step 3: Confirm and Delete
Type the file name (for example, Approved CIDR Ranges) in the confirmation field. The Delete button becomes enabled once the name matches exactly. Leave Retain history for deleted resources checked if you want Guardrails to keep the deletion history.
Click Delete to remove the file. Guardrails navigates you back to the parent folder after deletion.
What Happens After Deletion
- File data is removed: The file and its content are permanently deleted from Guardrails.
- Deletion history is preserved: Guardrails keeps an audit trail of the deletion in the activity log.
- Calculated policies are affected: Any policies that reference the deleted file by AKA will receive
nullfor the file data on their next evaluation. Review and update those policies to avoid errors.
Troubleshooting
| Issue | Solution |
|---|---|
| Delete button stays disabled | The typed name must match the file's title exactly, including capitalization and spaces. |
| Calculated policies showing errors after deletion | Update or remove the resource(id: "file_aka") query from affected calculated policies. |
| Further assistance | Open a Support Ticket |
Next Steps
- Create a File: Create a new file to replace the deleted one.
- Create a File via Terraform: Manage files as infrastructure-as-code for version control and repeatability.