DEV Community

Cover image for Drifts again
Paweł Piwosz for AWS Community Builders

Posted on

Drifts again

In the previous episodes we learned what is drift and how to detect it. We also learned how to configure the workers pools and use them to run our workloads. Finally, we know that drift detection can be run on workers pool only. So, let's put this knowledge together, and schedule the detection.

Change the behavior

First, we need to change the behavior for the whole stack. Navigate to Behavior tab and switch the Worker pool from default to newly created one.

Change workers pool

Create the schedule

We have to repeat the steps we already try to done once.

Navigate to Settings then Scheduling and create new schedule for drift detection.

Create schedule

As we can see, there is no need to set the workers pool, it is already done on the stack level.

When done, we should see confirmation and details of scheduled task.

Created schedule

Drift detected!

After the check is done, we can see the visualised report about the drift. We can look on this report from a few places, but we do it now from Stack's Resources tab.

Drift reported

The drifted resources are marked with sign on it.

Reconcile

The configuration we did is to detect drift only. I mentioned briefly, that we can also act on it. When we setup the drift detection, we can switch Reconcile on. In this case, when drift will be detected, the corresponding stack will be triggered to fix it.

Summary

Clearing drifts in automatic way should be the goal of every team when use IaC. Spacelift is doing it well.

I think though, there are some points for improvements

  • Reload button. Even if the page is reloading periodically, I wish to have this option.
  • More details about drifted resources. Something like should be vs it is comparision for drifted resources.

Takeaways

We learned how to create drift detection and how to act on it. We also know how to check and visualise drifts.

Oldest comments (0)