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

[!CAUTION] Before deleting a file, verify that no calculated policies reference it. Policies that query a deleted file via resource(id: "file_aka") will receive null data, 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.

Remove File confirmation dialog requiring you to type the file name to confirm deletion

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

Troubleshooting

IssueSolution
Delete button stays disabledThe typed name must match the file's title exactly, including capitalization and spaces.
Calculated policies showing errors after deletionUpdate or remove the resource(id: "file_aka") query from affected calculated policies.
Further assistanceOpen a Support Ticket

Next Steps