Modify a File
In this guide, you will modify an existing Guardrails File using the console UI. You can update the file's title, description, and content. When you save changes to a file's content, Guardrails automatically re-evaluates all calculated policies that reference it: no policy changes needed.
Prerequisites
- Access to the Guardrails console with
Turbot/AdminorTurbot/Ownerpermissions. - An existing Guardrails File to modify.
Step 1: Navigate to the File
Find the file you want to modify. You can navigate to it from the parent folder's Resources tab, or search for it in the Resources page.
Step 2: Open the Edit Dialog
On the file's detail page, click Edit in the top-right corner. The Edit File dialog opens with the file's current name, description, and content.

[!NOTE] The AKA field is not shown in the edit dialog because it is immutable: once set during creation, it cannot be changed. This ensures that calculated policies referencing the file by AKA continue to work without modification.
Step 3: Update the File
Modify the fields you want to change:
| Field | Description |
|---|---|
| Name | Update the display name. Max 64 characters. |
| Description | Update or add a description. Max 1,024 characters. |
| Content | Edit the YAML or JSON data in the Edit tab. The editor validates syntax in real time. |
Click Update to apply the changes.
What Happens After Saving
When you update a file's content:
- Immediate update: The file's data is updated in Guardrails.
- Automatic re-evaluation: All calculated policies that reference this file via
resource(id: "file_aka")are automatically re-evaluated. This may take a few minutes depending on the number of policies and resources affected. - No policy changes needed: You don't need to modify or redeploy any policy settings. The policies pick up the new file data on their next evaluation cycle.
This is one of the key benefits of using files: you can change centralized data (like CIDR ranges, cost center mappings, or approved regions) in one place and have all referencing policies update automatically.
Troubleshooting
| Issue | Solution |
|---|---|
| Update button disabled | Make a change to the name, description, or content. If the content has a YAML or JSON syntax error, fix the highlighted error in the editor. |
| Content must be an object | File content must be a JSON object (e.g., {"key": "value"}). Scalar values like strings or numbers are not allowed. |
| Policies not updating after save | Re-evaluation may take a few minutes. Check the control's Activity tab to confirm re-evaluation is in progress. |
| Further assistance | Open a Support Ticket |
Next Steps
- Delete a File: Remove a file that's no longer needed.
- Use a File in a Calculated Policy: Reference file data in dynamic policy decisions.