Periodic Plan Drift Detection
A periodic plan runs plan on a workspace automatically on a schedule, for example every 12 hours. If someone changed the infrastructure outside of code, the plan finds the difference and Firefly shows exactly what drifted, attribute by attribute.
Periodic plan drift detection works with any provider. If Terraform or OpenTofu can plan a resource, Firefly can detect drift on it. It works alongside the drift detection in the Cloud Asset Inventory, which compares your codified assets with the live state of your connected data sources.
Related Guides:
Creating Workflows: Create a workspace and set its execution options, including the periodic plan.
Drift Detection & Remediation: How Firefly detects and remediates drift across your infrastructure.
Availability
Periodic plans are available for workspaces that Firefly orchestrates:
Workspaces on Firefly Runners.
Workspaces on Self-Hosted Runners.
Periodic plans aren't available for workspaces that integrate into an existing CI/CD pipeline (Bring Your Own Pipeline), because Firefly doesn't run those plans.
Setting a Periodic Plan
You set the periodic plan in the workspace's execution settings, either when you create the workspace or later from Edit Workspace.
In the workspace wizard, go to the execution settings.
Select Trigger plan periodically.
In Run plan every:, choose an interval: 72, 48, 24 or 12 hours. The default is 72 hours.
Save the workspace.
When a workspace has a periodic plan, its header shows the schedule, for example Periodic plan · every 12 hours, along with when the next run is due.
To stop the scheduled runs, edit the workspace and clear Trigger plan periodically.
Reading the Results
Each scheduled run appears in the workspace's run history with Triggered by: Periodic plan.
The run ends in one of these outcomes:
PLAN COMPLETED
The plan found no drift. The live infrastructure matches the code.
PLAN COMPLETED · DRIFT DETECTED
The plan found resources that were changed outside Terraform or OpenTofu.
PLAN FAILED
The plan couldn't complete. Open the run to see the logs for the failing step.
The Drift Banner
When drift is detected, the run's Overview shows a banner that says how many resources changed, for example 2 resources changed outside Terraform. The drift is found during the plan's refresh.
Warning: Applying a plan that contains drift reverts the live values to what's in code. Before you apply, decide whether to keep the live change by updating your code, or to revert it.
Viewing the Drift
Click View drift in the banner to open the Drift detected panel. For every drifted resource, the panel compares each changed attribute side by side:
Attribute: The resource attribute that changed.
In code: The value declared in your IaC.
Live: The value in the cloud.
An attribute shows (removed) or (not set) when it has no value on one side. A resource that was created or deleted outside Terraform or OpenTofu has no attribute changes to compare, and the panel says so.
To focus on one kind of resource, filter the list by resource type. Select All to see every drifted resource again.
Example: A team member disables a GCP firewall rule in the Google Cloud console and removes its 10.0.0.0/8 source range. On the next periodic plan, the run ends with PLAN COMPLETED · DRIFT DETECTED. In the Drift detected panel, the google_compute_firewall resource lists the disabled and source_ranges attributes, with the values In code next to the Live values.
Limitations
Drift is detected only on periodic plan runs. Runs that you start manually or that a pull request triggers don't show the drift status or the drift details, even if the infrastructure has drifted.
Drift found by a periodic plan doesn't yet create an event in the Event Center, and doesn't send a notification to your notification channels. Check the workspace's run history to see the results.
Last updated
Was this helpful?