---
title: "Using Terraform to Manage Infrastructure"
description: "Shopify’s Conversations team used Twilio TaskRouter to route voice and chat tasks to agents according to routing rules and skills. As routing needs grew, configuration through Twilio’s GUI became difficult to understand and lacked clear change history, tests, and rollback support. Terraform provided an infrastructure-as-code workflow, backed by a reliable API, a Go client library, and a provider implementing CRUD operations; the team built a provider because Twilio did not have one at the project’s start. Resource definitions included schemas, dependencies, and an importer, while Terraform’s plan and apply commands previewed and executed changes. Integrated with Atlantis and GitHub pull requests, the workflow added plans, reviews, revision history, and easier rollbacks, while enabling business and support teams to submit infrastructure changes themselves."
---

# Using Terraform to Manage Infrastructure

[Shopify](https://yomu.fyi/company/shopify) · 2023-10-18 · Mar 17, 2022

**Type:** Tutorial

## Summary

Shopify’s Conversations team used Twilio TaskRouter to route voice and chat tasks to agents according to routing rules and skills. As routing needs grew, configuration through Twilio’s GUI became difficult to understand and lacked clear change history, tests, and rollback support. Terraform provided an infrastructure-as-code workflow, backed by a reliable API, a Go client library, and a provider implementing CRUD operations; the team built a provider because Twilio did not have one at the project’s start. Resource definitions included schemas, dependencies, and an importer, while Terraform’s plan and apply commands previewed and executed changes. Integrated with Atlantis and GitHub pull requests, the workflow added plans, reviews, revision history, and easier rollbacks, while enabling business and support teams to submit infrastructure changes themselves.

## Context

The team managed Twilio TaskRouter configuration through a GUI as routing requirements became more complex. The GUI did not provide clear change history, tests, or an easy way to roll back changes, making infrastructure changes less accountable and predictable.

## Approach / What changed

The team used Terraform to manage TaskRouter as infrastructure code. Because Twilio lacked a provider when the project began, they built one in Go using a Go API client and the Terraform Plugin SDK, defining CRUD operations, schemas, dependencies, and an importer. Atlantis integrated Terraform plan and apply with GitHub pull requests and reviews.

## Takeaways

- Terraform requires a reliable target API, a Go client library for that API, and a provider written with the Terraform Plugin SDK.
- A Terraform resource definition can include CRUD functions, an importer for existing infrastructure, a schema, and dependencies such as a required workspace.
- Atlantis adds Terraform plan output and apply commands to GitHub pull requests, providing review history and making infrastructure changes easier to understand and roll back.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Developer Experience](https://yomu.fyi/topic/developer-experience), [Go](https://yomu.fyi/topic/go), [Open Source](https://yomu.fyi/topic/open-source)

- Source: [Shopify](https://shopify.engineering/manage-infrastructure-with-terraform)
- Source URL: https://shopify.engineering/manage-infrastructure-with-terraform
- Ingested by Yomu: 2026-08-30T15:27:17.424Z

[Read original post](https://shopify.engineering/manage-infrastructure-with-terraform)
