Create a Policy Setting

In this guide, you will create a new policy setting in Turbot Guardrails to define how a specific policy type is evaluated against your cloud resources. Policy settings are the primary mechanism for telling Guardrails what to check, what to enforce, and where to apply those rules.

Prerequisites

Step 1: Open the New Policy Setting Form

Select Policies in the left sidebar. The Policies page lists your policy types alongside cards for your policy packs and existing policy settings. Click New Policy Setting in the top right.

Policies page showing the policy types explorer and the New Policy Setting button

The Create Policy Setting form opens with everything on one page: the policy type, the target resource, the value, and the precedence.

Empty Create Policy Setting form with Policy Type, Resource, Setting, and Precedence fields

Step 2: Choose the Policy Type

Click the Policy Type field and start typing. The picker filters as you type and shows the full path for each match, so you can tell similar policies apart.

For this example, search for versioning and choose AWS > S3 > Bucket > Versioning.

Policy Type picker filtered to versioning, showing the AWS S3 Bucket Versioning match

When you select a policy type, the right rail fills in with Policy Overview & Recommendations and the Policy Specification (targets, schema type, default value, and valid values), so you can confirm you picked the right one before saving.

Step 3: Choose the Resource

Click the Resource field and search for where the setting should apply. The picker searches your workspace hierarchy: the Turbot root, folders, cloud accounts, and the resources beneath them.

For this example, search for Retail Banking and choose the AWS account 169446447258.

Resource picker filtered to Retail Banking, showing the matching AWS account

[!NOTE] A policy setting applies to the resource you pick and everything below it in the hierarchy, so most settings target an account or a folder. To compute a different value for individual resources, use a calculated policy instead.

Step 4: Select the Setting Value

The Setting section shows the values this policy type accepts. Policy types with a short list of values, like this one, present them as radio buttons; types with many values use a dropdown instead.

Select the value that matches your compliance intent:

ValueBehavior
SkipGuardrails ignores this policy entirely for resources in scope. Use this for resources that don't need governance for this policy type.
Check: DisabledGuardrails checks whether the setting is disabled and reports an alarm if it's enabled.
Check: EnabledGuardrails checks whether the setting is enabled and reports an alarm if it's not, but takes no action. Good for visibility without enforcement.
Enforce: DisabledGuardrails actively enforces that the setting is disabled, reverting any changes.
Enforce: EnabledGuardrails actively enforces that the setting is enabled. If a resource drifts out of compliance, Guardrails remediates it automatically.

For this example, select Check: Enabled.

Create Policy Setting form with the policy type, resource, and Check: Enabled value selected

The Enable calculated mode link beside the Setting label switches the value to a computed expression rather than a fixed choice. See Create a Calculated Policy for that workflow.

Step 5: Set the Precedence

Choose the precedence level for your setting:

PrecedenceBehavior
RequiredThis setting is mandated on descendant resources unless an exception is granted. Use this when the rule must be enforced consistently.
RecommendedThis setting acts as a default that descendant resources can override with their own setting. Use this for guidelines that teams can adjust.

For most governance scenarios, Required is the appropriate choice.

Optional: Note and Expiration

FieldDescription
Add noteA free-text note explaining why this setting exists. It shows on the setting detail page, which is useful for audit trails and team context.
Add expirationAn automatic expiration date. Guardrails removes the setting after this date, which is useful for temporary exceptions or time-boxed pilots.

Step 6: Create the Setting

Click Create. Guardrails saves the setting and opens its detail page.

Policy setting detail page showing the value, precedence, note, and Setting, Hierarchy, Values, Activity, and Developers tabs

The detail page header shows the policy type (AWS > S3 > Bucket > Versioning) and the target resource, along with Edit and Delete buttons. Confirm that:

The Values tab shows the resources this setting resolves against, and the Activity tab tracks the controls it drives as they evaluate.

Via Terraform

You can also create policy settings using the Turbot Guardrails Terraform provider. This is the recommended approach for managing settings at scale or as part of infrastructure-as-code workflows.

resource "turbot_policy_setting" "s3_bucket_versioning" {
  resource   = "arn:aws:::169446447258"
  type       = "tmod:@turbot/aws-s3#/policy/types/bucketVersioning"
  value      = "Check: Enabled"
  precedence = "required"
  note       = "Ensure S3 bucket versioning is enabled for data protection"
}

Troubleshooting

IssueSolution
Policy type not found in searchVerify the mod is installed. For example, AWS > S3 > Bucket > Versioning requires the aws-s3 mod. Check Workspace > Mods.
Resource not appearing in the pickerThe resource must be imported into Guardrails. Verify the account or organization is connected and discovery is complete.
Setting created but no controls runningControls may take a few minutes to evaluate. Check the Activity tab on the policy setting for progress.
"Conflict" error on createA setting for this policy type and resource already exists. Edit the existing setting instead of creating a new one.
Further assistanceOpen a Support Ticket

Next Steps