Technology · Infrastructure as code

Terraform: infrastructure
you can review.

Terraform describes your cloud infrastructure in text files, instead of clicks in a console. Every project, every access permission, every resource can be reviewed, versioned and recreated identically.

Infrastructure as codeGoogle CloudAWSGit

THE TOOL

Terraform in brief.

A data platform rests on dozens of cloud resources: projects, datasets, service accounts, permissions, schedules. You can create them by hand in a console. Six months later, nobody remembers who opened a given access or why. Terraform turns the problem around: you describe the desired state in files, the tool compares it with what exists and applies the difference. This is the principle of infrastructure as code.

Terraform is published by HashiCorp and works with Google Cloud, AWS, Azure and many other services. The command-line tool can be used without a subscription; the vendor also sells a hosted offering for teamwork. Before each change, Terraform displays a plan: what will be created, modified, deleted. That plan is reviewed like any other code change.

OUR PRACTICE

What we build with Terraform.

01

The foundation of a platform.

For a luxury maison, the platform’s infrastructure is described with Terraform, alongside the BigQuery data warehouse, the dbt transformations and the Looker dashboards.

02

Twin environments.

Development and production come out of the same files. What is tested on one side is what will be deployed on the other.

03

Readable permissions.

Who has access to which data: the answer is in the code repository, with the history of every change. It is a concrete part of data governance.

IN PRACTICE

For whom, and for whom not.

Terraform is a good choice if…

  • Your platform has several environments or several cloud projects.
  • Several people modify the infrastructure and you want a review before each change.
  • You need to be able to show who has access to what, for example during an audit.
  • You want to be able to rebuild the environment after an incident, or duplicate it for a subsidiary.

Look elsewhere if…

  • Your infrastructure fits in one project and three resources created once and for all.
  • Nobody will maintain the files: a description that no longer reflects reality is worse than no description.
  • You want to deploy application code or dbt models: that is the role of continuous integration, not of Terraform.
  • You require a strictly open source licence: look at OpenTofu, a project derived from Terraform.

IN PRODUCTION

Our implementation rules.

The tool is simple. It is team habits that make the difference.

  • A remote, locked state: the file that records the existing infrastructure lives in shared storage, never on someone’s machine.
  • A plan reviewed before every apply: the change goes through a merge request, the plan is shown there, a colleague approves.
  • Apply through continuous integration: nobody applies from their own computer. The account that deploys has its own limited permissions.
  • No manual changes: whatever is created in the console is either imported into the code or deleted.
  • Reused modules: a dataset, its permissions and its labels are declared the same way everywhere.
  • No secrets in plain text: passwords and keys stay in a vault, the code holds only the reference.

FREQUENTLY ASKED QUESTIONS

What we are often asked.

Is it useful for a small platform?

Yes, as soon as there are two environments or more than one person touching the infrastructure. The upfront cost is low when you start with Terraform. It is higher when you have to describe after the fact resources created by hand over three years, a classic task when you modernise a platform.

Will our teams have to learn Terraform?

To read a change, no: the files are declarative and can be understood without training. To write them, an engineer picks it up quickly. We document the common cases: adding a user, creating a dataset, opening an access.

Does Terraform also manage tables and data?

It manages the container: projects, datasets, permissions, schedules. The content, meaning the tables and their transformations, falls to dbt. Keeping that boundary clear avoids two tools fighting over the same resource.

WHAT COMES NEXT, WE BUILD TOGETHER

Your next project
starts with a conversation.

An idea, a pain point, a project to kick off? Let’s talk about what would make a difference for your teams.

Let’s talk about your project