New Features
New Features
May 31, 2021

New Feature: Smart Plan Outputs

By
Sebastian Stadil

Today I’d like to showcase a new feature we released a few hours ago to help you know exactly what will happen when you approve a Terraform plan by highlighting destructive changes, adding search, and improving layout.

Problem & Pain

Veteran Terraform developers like yourselves know just how painful it is to miss a destructive change. It’s the number one source of bad deployments and downtime.

Since you know how important it is to carefully review terraform plan output, you must also know how excessively tedious it is. Reviewing a long Terraform plan is the devops equivalent of reviewing a massive PR. Ya don’t want them.

You squint your eyes as you review the drab output in the terminal and use a combination of grep and other tools to review it, being careful not to mistake ~ for -, the former being used for updates and the - for deletes. Perhaps you copy-paste into an editor to search through it. Perhaps you even created a homegrown tool like many did, such as Scalr community members, Coinbase with Landscape or Chris Lewis with prettyplan. Sadly these last two projects are no longer maintained and don’t work with tf >=0.12.

Solution

Scalr addresses this with a new layout, search, and highlight interface for Terraform plans. See for yourself:

The new interface highlights destructive changes, allows you to effortlessly search the entire plan, and is linked to your VCS and CLI so you can easily jump to it straight from your PR or command-line.

It’s awesome, and “makes the review process much simpler to drill into resources of concern” as a customer put it today.

We strive to include a quality of life feature in every release, and this is one heck of a quality of life improvement. Missing destructive changes is the number one source of deployment disasters and highlighting them at review-time is incredibly important. Plus, the visualization, search, and filters offered make it easy to review even the longest plans

How the Feature Works

Scalr executes operations such as plan or apply on its own service (or on self-deployed agents) before streaming the output to your console, which allows us to capture the plan and present it to you in alternative and superior ways.

How to Get Started

This new interface is now available to everyone, at no cost and with no subscription needed. To get started, simply add this snippet of code to your Terraform config and carry on using terraform as normal. You’ll find the link to click in the output.

Note: While this blog references Terraform, everything mentioned in here also applies to OpenTofu. New to OpenTofu? It is a fork of Terraform 1.5.7 as a result of the license change from MPL to BUSL by HashiCorp. OpenTofu is an open-source alternative to Terraform that is governed by the Linux Foundation. All features available in Terraform 1.5.7 or earlier are also available in OpenTofu. Find out the history of OpenTofu here.

Start using the Terraform platform of the future.

A screenshot of the modules page in the Scalr Platform