Back to Blog

Shoreline.io Delivers Remediation as Infrastructure-as-Code Through New HashiCorp Terraform Verified Provider

Handle remediation with the same Terraform workflow you use to provision and manage infrastructure.

HashiCorp Terraform has greatly simplified the configuration and deployment of infrastructure by providing a consistent CLI workflow and codifying cloud APIs into declarative configuration files. Terraform embraces automation for provisioning workflows to increase productivity and reduce human error. One opportunity to improve automation exists in remediation workflows. Often the artifacts used to troubleshoot and replay production environments are locked in SREs' heads or out-of-date wiki pages. Microservices, multi-cloud environments, and the increasing pace of deployments make this yet harder.

Shoreline + Terraform Provide Incident Automation for Production Operations

Most issues have well-understood fixes. At Shoreline, we believe you shouldn't have to wake up to deal with them manually. They shouldn't cause hours of downtime. And it shouldn't take months to build automated remediations. Shoreline incident automation makes it easy to build the metrics, alarms, actions, and bots to resolve commonplace issues. For new issues, Shoreline provides real-time, parallel, distributed debugging so you can find "needle-in-a-haystack" issues.

Shoreline now offers a Terraform provider, enabling your team to handle remediation with the same Terraform workflow that they use to provision and manage infrastructure. By adding Shoreline's Terraform provider, customers can automate the testing, configuration, and deployment of their production operations remediations just as they do for their other artifacts. This ensures engineering best practices including code reviews, test pipelines, and version control. Shoreline handles deploying your scripts and logic so your remediations run consistently across your VMs and containers.

With Shoreline and Terraform, SREs can create remediations in minutes, not months as required by hand-coding. Each remediation is deployed consistently across your VMs and containers, even as they come and go. Remediations set up control loops, with metrics and alarms calculated each second, executing actions as needed. This reduces MTTD and MTTR to seconds, reduces SRE toil, and improves availability.

Enabling Shoreline in Your Terraform Cloud Workspace

SREs are using Shoreline to automatically rotate expiring certificates, grow filling disks, purge old Docker images, collect stuck JVM diagnostics, identify unauthorized resource usage, handle stuck Argo workflows, repair unhealthy CoreDNS nodes, and more -- all with simple one-liners, using the Linux commands and scripts they already know, in real time, and executed fleet-wide in seconds. Shoreline provides these as Op Packs delivered as Terraform modules containing all the metrics, alarms, actions, bots, and scripts needed. SREs can deploy these as is, modify as needed, or create their own.

Once you've signed up for a Shoreline account, add the following to your Terraform configuration to use the Shoreline Provider:

This is the minimal configuration, beyond which you'll add Op Packs or your own custom Terraform modules. Everything that can be configured within Shoreline can be configured through Terraform, including actions, alarms, bots, metrics, and files. A tutorial is available here.

The next step is to create an execution plan.


This command analyzes remote objects within your cluster and compares them against what you've defined in your Terraform configuration. Differences are output and Terraform indicates which changes will occur if you apply this configuration.

You can then apply your changes.

This will upload all modified elements to Shoreline. Shoreline will then take responsibility for deploying these to your VMs and containers as they come into existence.

To get started or learn more, visit Shoreline.io or email hello@shoreline.io to schedule a personalized demo or consultation. If you are new to Terraform, download the open source version, and get remote state storage for free by using Terraform Cloud.