Enable Auto Mod Updates
In this guide, you will configure the Turbot > Mod > Auto Update policy to automatically update mods when new versions are published to the Turbot registry. This eliminates the need to manually update each mod and ensures your workspace stays current with the latest resource definitions and bug fixes.
Prerequisites
- Access to the Guardrails console with
Turbot/Ownerpermissions.
Step 1: Find the Auto Update Policy
Navigate to the Policies tab and search for Auto Update. Select the Turbot > Mod > Auto Update policy. This displays the main policy and its sub-policies.
| Sub-Policy | Description |
|---|---|
| Turbot > Mod > Auto Update | The main policy that controls automatic updates. |
| Turbot > Mod > Auto Update > Desired Version | The target version, calculated by matching the Version Range against versions available in the registry. |
| Turbot > Mod > Auto Update > Version Range | The allowed range of versions. Defaults to ^{MAJOR}, the latest version within the same major release. |
| Turbot > Mod > Auto Update > Schedule | The time window when Guardrails is permitted to apply mod updates. Only used when the parent policy is set to Enforce within Mod Change Window. |
Step 2: Create the Auto Update Policy Setting
Click New Policy Setting to create a setting for the Turbot > Mod > Auto Update policy.
Set the Resource to Turbot (the workspace root) to apply auto-updates workspace-wide.
Choose one of the following values:
| Value | Behavior |
|---|---|
Check | Raises an alarm when a mod is out of date but does not update it. Useful for monitoring before enabling enforcement. |
Enforce | Automatically updates the mod as soon as a new version matching the Version Range is available. |
Enforce within Mod Change Window | Schedules mod updates to occur only during the defined change window. |
[!IMPORTANT] The policy evaluates against the
Turbot > Mod > Desired Versionpolicy, which is calculated from theTurbot > Mod > Version Rangepolicy. If Version Range is not set, Guardrails targets the latest recommended version.
Step 3: Configure the Schedule (Optional)
If you chose Enforce within Mod Change Window, you need to define when updates are allowed.
Select the Turbot > Mod > Auto Update > Schedule sub-policy and click New Policy Setting. Set the Resource to Turbot and define your change window.
The schedule format is a YAML list of time windows:
- name: Weekend maintenance
description: Saturday morning maintenance window
start: "2024-01-06T06:00:00Z"
duration: 4
| Field | Description |
|---|---|
| name | A label for the change window. |
| description | A description of when and why this window exists. |
| start | The start time in UTC (ISO 8601 format). |
| duration | The window length in hours. |
[!NOTE] All schedule times are in UTC.
Step 4: Verify the Configuration
Navigate back to the Turbot > Mod > Auto Update policy and confirm that your settings are applied:
- The policy value shows your chosen enforcement level.
- The resource scope is set to
Turbot. - If using a schedule, the Schedule sub-policy shows your change window.
When a new mod version is published that matches the Version Range, Guardrails will automatically update (or alert, depending on your setting).
Troubleshooting
| Issue | Solution |
|---|---|
| Mods not updating automatically | Verify the policy is set to Enforce or Enforce within Mod Change Window, not Check. Confirm the Version Range allows the new version. |
| Updates happening outside the change window | Double-check that the parent policy is set to Enforce within Mod Change Window (not Enforce). Verify the schedule times are in UTC. |
| Want to pin a mod to a specific version | Set the Turbot > Mod > Auto Update > Version Range sub-policy to the exact version (e.g., 5.24.1) for that specific mod's resource. |
| Further assistance | Open a Support Ticket |
Next Steps
- Update a Mod: Manually update a specific mod when needed.
- Learn more about Policies and how policy settings are inherited.