Jump to ratings and reviews
Rate this book

Terraform in Action

Rate this book
Use Terraform to programmatically create, test, and manage infrastructure using the efficient infrastructure-as-code approach.

Summary

In Terraform in Action you will

Cloud architecture with Terraform
Terraform module sharing and the private module registry
Terraform security in a multitenant environment
Strategies for performing blue/green deployments
Refactoring for code maintenance and reusability
Running Terraform at scale
Creating your own Terraform provider
Using Terraform as a continuous development/continuous delivery platform

Terraform in Action introduces the infrastructure-as-code (IaC) model that lets you instantaneously create new components and respond efficiently to changes in demand. You’ll use the Terraform automation tool to design and manage servers that can be provisioned, shared, changed, tested, and deployed with a single command.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology

Provision, deploy, scale, and clone your entire stack to the cloud at the touch of a button. In Terraform, you create a collection of simple declarative scripts that define and manage application infrastructure. This powerful infrastructure-as-code approach automates key tasks like versioning and testing for everything from low-level networking to cloud services.

About the book

Terraform in Action shows you how to automate and scale infrastructure programmatically using the Terraform toolkit. Using practical, relevant examples, you’ll use Terraform to provision a Kubernetes cluster, deploy a multiplayer game, and configure other hands-on projects. As you progress to advanced techniques like zero-downtime deployments, you’ll discover how to think in Terraform rather than just copying and pasting scripts.

What's inside

Cloud architecture with Terraform
Terraform module sharing and the private module registry
Terraform security in a multitenant environment
Strategies for performing blue/green deployments

About the reader

For readers experienced with a major cloud platform such as AWS. Examples in JavaScript and Golang.

About the author

Scott Winkler is a DevOps engineer and a distinguished Terraform expert. He has spoken multiple times at HashiTalks and HashiConf, and was selected as a HashiCorp Ambassador and Core Contributor in 2020.

Table of Contents

PART 1 TERRAFORM BOOTCAMP
1 Getting started with Terraform
2 Life cycle of a Terraform resource
3 Functional programming
4 Deploying a multi-tiered web application in AWS
PART 2 TERRAFORM IN THE WILD
5 Serverless made easy
6 Terraform with friends
7 CI/CD pipelines as code
8 A multi-cloud MMORPG
PART 3 MASTERING TERRAFORM
9 Zero-downtime deployments
10 Testing and refactoring
11 Extending Terraform by writing a custom provider
12 Automating Terraform
13 Security and secrets management

408 pages, Paperback

Published July 6, 2021

38 people are currently reading
109 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
17 (26%)
4 stars
29 (44%)
3 stars
18 (27%)
2 stars
1 (1%)
1 star
0 (0%)
Displaying 1 - 7 of 7 reviews
Profile Image for Sebastian Gebski.
1,200 reviews1,376 followers
May 6, 2022
This book has plenty of pros, but still - I didn't like it.

What pros?
- it's cloud-agnostic - not focused on any single provider
- the examples are quite interesting and still, they don't require you to learn any specific services
- many practical aspects are covered (config mgmt vs provisioning, zero downtime deployments, testing IaaC code, extending Terraform, etc.)
- it's clear that the author has put a lot of effort into creating this book, which should be appreciated

So, what's my problem with TiA?

It follows a popular paradigm of learning by doing. The author presents the problem and the code that covers the solution. That code is peppered with comments that explain new elements and/or the most interesting parts.

Unfortunately, that's NOT the way I learn comfortably. I need MENTAL MODELs. I need the conceptual overview of the language (HCL) - how are the constructs composed, structured, and hierarchized. I need to understand how the tool (in this case - Terraform) was designed, so I can follow the creators and pretty much figure out the solutions before they are presented. But that's not how this book is composed - that's why (for me) it was irritating and - in the end - sort of a waste of time.

Unfortunately, it's only 3 stars, BUT maybe you're more compatible with that (described before) another mode of learning. In your case, it maybe even full 5.
Profile Image for Ferhat Elmas.
862 reviews13 followers
January 26, 2025
It provides practical examples that help you get started quickly but falls short of explaining the underlying reasons or high-level concepts behind its approach. While it’s sufficient for hands-on learning and immediate application, it doesn’t comprehensively address the deeper gaps in understanding for those seeking a more thorough grasp of the tool.
Profile Image for Jeanne Boyarsky.
Author 28 books76 followers
September 18, 2022
“Terraform in Action” starts by comparing Terraform to other tools. The very first examples assumes a bit of AWS knowledge but is understandable. The book uses Terraform 0.15. Don't let the numbering fool you. 1.0.0 was released in summer 2021 and isn't that different. Each chapter ends with both a fireside chat and summary. The summary is the standard Manning bullet points. The fireside chat is textual in nature sometimes containing tables and diagrams to reinforce.

Chapter 2 does an excellent job explaining state. I didn't know you could save the plan as a dot file. That lets you view it in Graphiz to see the graph visually. I'm looking forward to trying out that feature!

As the book goes on, the features get more advanced. Some are specialized like writing your own provider. Others don't apply to everyone but are more common like Terraform Enterprise. It was easy to see which chapters you should read.

This is a good book for learning Terraform or increasing your knowledge
Profile Image for Craig Rodrigues.
5 reviews1 follower
August 17, 2022
Well written, easy to understand.
Good explanation of CRUD (Create, Read, Update, Delete) operations for resources
and R (Read) operation for data sources.
Profile Image for Aaron Lindahl.
76 reviews3 followers
October 3, 2024
Great if youre looking to use terraform and prefer a book for learning.
Profile Image for Chris Austin.
76 reviews9 followers
May 7, 2022
A good introduction if you're new to Terraform, and some useful structure if you've been suffering from organic growth without following basic engineering principles like DRY.

It was a 3.5 for me since I didn't learn much new from it - I was specifically looking for material on scaling up with terraform by refactoring into multiple regions, multiple environment types, and considerations around different strategies for this when dealing with heterogeneous environments - workspace with separate variables; global and regional infra states plus per-stack, etc. The chapter on automating terraform was ok but not useful since I'll just use Atlantis instead.
Displaying 1 - 7 of 7 reviews

Can't find what you're looking for?

Get help and learn more about the design.