Create an Exception
In this guide, you will create a policy exception to override a parent policy setting for a specific resource. Exceptions are how you handle cases where a broad governance rule needs to be relaxed for particular resources, such as a legacy application that can't meet a compliance requirement, or a sandbox bucket where enforcement isn't appropriate.
An exception is not a special object in Guardrails. It's simply a Required policy setting created at a lower level in the resource hierarchy that overrides a Required setting at a higher level. The most specific Required setting always wins.
Prerequisites
- Access to the Guardrails console with
Turbot/Adminpermissions or higher. - An existing Required policy setting at a parent level (account, folder, or workspace root) that you want to override.
How the Policy Hierarchy Works
Guardrails evaluates policy settings from the broadest scope down to the most specific:
Workspace Root
└── Cloud Provider (e.g., GCP)
└── Organization (goliathfederalbank.com)
└── Project (goliathfederalbank)
└── Region (us-east1)
└── Bucket (goliath-bucket-1-goliathfederalbank)
When multiple settings exist for the same policy type at different levels:
- A Required setting at a child level overrides a Required setting at a parent level.
- A Required setting at any level overrides all Recommended settings.
- A Recommended setting at a child level overrides a Recommended setting at a parent level.
This hierarchy is what makes exceptions possible: you create a more specific Required setting that takes priority over the broader one.
Step 1: Review the Current Policy Values
This example starts from a Required Check: Enabled setting for GCP > Storage > Bucket > Versioning on the goliathfederalbank project. Open that setting and select the Values tab to see the effective value for every bucket it governs. All five buckets inherit Check: Enabled from the project-level setting.

Step 2: Inspect the Policy Hierarchy
Click a bucket's Versioning value to open its Policy Value page. The Which policy setting is in effect for this value? section walks the hierarchy from the workspace root down to the bucket, marking each level that has a setting and highlighting the one that wins.
Here the Check: Enabled value comes from the project-level setting (goliathfederalbank), marked EFFECTIVE SETTING with Required precedence. Every level below it shows Create setting, so you can add an override at the region or the individual bucket.

In this guide we'll add the exception at the bucket level so only goliath-bucket-1-goliathfederalbank is affected.
Step 3: Create the Exception
Next to the bucket in the hierarchy, click Create setting (or Create Setting at the top of the page). The Create Policy Setting form opens pre-filled with the policy type (Versioning) and the bucket as the resource.
Select Skip as the value and leave the precedence as Required. This is critical: a Recommended setting cannot override a parent Required setting.

| Field | Value | Why |
|---|---|---|
| Value | Skip | Disables versioning checks for this specific bucket. |
| Precedence | Required | Must be Required to override the parent Required setting at the project level. |
[!TIP] Click Add expiration to make the exception temporary. When the date passes, Guardrails removes the exception and the bucket reverts to the parent policy value. Setting an expiration is a best practice for exceptions unless you have a permanent business reason for the override.
[!TIP] Click Add note to document the business justification (for example, "Legacy data pipeline uses unversioned buckets. Approved by security team, JIRA-1234.").
Click Create to save the exception.
Step 4: Verify the Exception
Reopen the bucket's Policy Value page. The hierarchy now shows two settings: the project-level Check: Enabled and the new bucket-level Skip. The bucket's Skip setting is marked EFFECTIVE SETTING, confirming the exception overrides the parent.

Return to the project setting's Values tab. It now reports 1 lower setting and lists only the four remaining buckets at Check: Enabled. The excepted bucket follows its own Skip setting and no longer inherits the project value.

Via Terraform
Managing exceptions in Terraform keeps your governance configuration auditable and version-controlled. Create a second turbot_policy_setting resource at the more specific scope:
# Parent setting: check versioning across the project
resource "turbot_policy_setting" "gcs_versioning_check" {
resource = "gcp://cloudresourcemanager.googleapis.com/projects/goliathfederalbank"
type = "tmod:@turbot/gcp-storage#/policy/types/bucketVersioning"
value = "Check: Enabled"
precedence = "required"
note = "Project-wide GCS versioning check"
}
# Exception: skip versioning check for the legacy data pipeline bucket
resource "turbot_policy_setting" "gcs_versioning_exception" {
resource = "gcp://storage.googleapis.com/projects/goliathfederalbank/buckets/goliath-bucket-1-goliathfederalbank"
type = "tmod:@turbot/gcp-storage#/policy/types/bucketVersioning"
value = "Skip"
precedence = "required"
note = "Legacy data pipeline, approved by security team, JIRA-1234"
}
Troubleshooting
| Issue | Solution |
|---|---|
| Exception not overriding the parent | Check that the exception uses Required precedence. A Recommended setting cannot override a parent Required setting. |
| Controls still show alarms after the exception | Allow a few minutes for re-evaluation. If alarms persist, verify the exception targets the correct resource in the hierarchy. |
| Exception expired but the setting still exists | Expiration processing runs periodically. If the setting persists after its expiration date, allow a few more minutes or delete it manually. |
| Too many exceptions making policy hard to manage | Consider restructuring your hierarchy. Move resources that need different treatment into a separate folder with its own policy setting, rather than creating individual exceptions. |
| Further assistance | Open a Support Ticket |
Next Steps
- Update a Policy Setting: Modify an exception's value or extend its expiration.
- Delete a Policy Setting: Remove an exception when it's no longer needed.
- Create a Calculated Policy: For more granular exceptions based on resource attributes, such as skipping only buckets with a specific tag.