Terraform in Action
Scott Winkler
  • MEAP began July 2019
  • Publication in Spring 2020 (estimated)
  • ISBN 9781617296895
  • 350 pages (estimated)
  • printed in black & white

The best book about Terraform available at the moment.

Jürgen Hötzel

By treating your infrastructure as a codeable application, you can instantaneously create and launch new components and respond efficiently to changes in demand and other use requirements. Terraform in Action introduces the Infrastructure-as-Code model using the amazing Terraform automation tool, teaching you how to design and manage servers that can be provisioned, shared, changed, tested, and deployed at the touch of a button. Unlock the full potential of Terraform to manage your infrastructure as easily as you manage your codebase.

Table of Contents detailed table of contents

Part 1: Learning the Ropes

1 Getting Started with Terraform

1.1 What makes Terraform so great?

1.1.1 Provisioning Tool

1.1.2 Easy to Use

1.1.3 Free and Open-Source Software

1.1.4 It’s Declarative!

1.1.5 Cloud Agnostic

1.1.6 Richly Expressive and Highly Extendable

1.2 Hello Terraform!

1.2.1 Writing the Terraform Configuration Files

1.2.2 Configuring the AWS Provider

1.2.3 Initializing Terraform

1.2.4 Deploying the EC2 Instance

1.2.5 Destroying the EC2 Instance

1.3 A Brave New Hello World!

1.3.1 Modifying the Terraform Configuration Files

1.3.2 Applying Changes

1.3.3 Destroying Infrastructure

1.4 Overview

1.5 Summary

2 Lifecycle of a Terraform Resource

2.1 Process Overview

2.2 Declaring a Local File Resource

2.3 Initializing the Workspace

2.4 Generating an Execution Plan

2.5 Creating the Local File Resource

2.6 Updating the Local File Resource

2.6.1 Detecting Configuration Drift

2.7 Deleting the Local File Resource

2.8 Summary

3 Building a Mad Libs Template Engine

3.1 First Attempt at Mad Libs

3.2 Making the Word Pool

3.3 Shuffling the Words

3.4 Using Template Data Sources

3.5 Outputting to a Local File

3.6 Improving Mad Libs with Expressions

3.7 Getting Fancy with For Expressions

3.7.1 Implicit Dependencies

3.8 Scaling Resources by Incrementing Count

3.8.1 A Better Way to Template

3.9 Compressing Files with an Archive Resource

3.10 Applying Changes

3.11 Overview

3.12 Summary

4 Deploying a Multi-Tiered Web Application in AWS

4.1 Motivation

4.2 Architecture Overview

4.3 Modules are Your Friend

4.3.1 Standard Module Structure

4.4 Root Module

4.5 Networking Module

4.6 Database Module

4.6.1 Passing Data from the Networking Module

4.6.2 Generating a Random Password

4.7 Autoscaling Module

4.7.1 Trickling Down Data

4.7.2 Detailed Module Planning

4.7.3 Getting Real with Template Files

4.7.4 Final Touches

4.8 Deploying the Webapp

4.9 Overview

4.10 Summary

Part 2: Terraform in the Wild

5 Serverless Made Easy

6 Collaborating with Friends

7 CICD Pipelines as Code

8 Multi-Cloud means Multiplayer

Part 3: Becoming a Terraform Guru

9 Blue/Green Deployments

10 Extending Terraform by Writing your own Provider.

11 Developing a Terraform CICD platform

12 Secrets Management

About the Technology

Terraform is a provisioning tool for building, changing, and combining cloud infrastructure safely and efficiently. By defining infrastructure as code, Terraform empowers its users to deploy their entire stack to the cloud at the touch of a button. This code-based infrastructure can be shared easily among team members, managed using version control, and configured to reliably test new configurations without running the risk of breaking live systems. Easily integrated with all major cloud providers, mastery of Terraform is increasingly essential for anyone with a role working in DevOps, Operations, or SRE.

About the book

Terraform in Action unlocks the full potential of infrastructure you can automate, scale, and manage programmatically using Terraform. Through hands-on projects, including deploying a multiplayer game and a fully-managed Kubernetes cluster, distinguished Terraform expert Scott Winkler shows you how to think in Terraform rather than just copy-paste code. Written to focus on Terraform 0.12 and covering new syntax, the book covers both fundamentals and advanced designs, such as zero-downtime deployments and creating your own Terraform provider. When you’re done, you’ll be able to seamlessly manage Terraform cloud architecture and use Terraform as the basis for a continuous development/continuous delivery platform.

What's inside

  • Cloud architecture with Terraform
  • Sharing Terraform modules and the private module registry
  • Running Terraform securely in a multitenant environment
  • Strategies for performing Blue/Green deployments with Terraform

About the reader

Written for readers experienced with major cloud platforms such as AWS or Google Cloud. Examples are in the Go language.

About the author

Scott Winkler is a distinguished Terraform speaker. He has presented at HashiConf 2018 and HashiTalks 2019 on novel ways to leverage Terraform for the enterprise. His ideas have made their way into the open source community, either through his personal contribution or indirectly through Hashicorp partners. He has trained dozens of DevOps engineers on how to use Terraform and has created comprehensive CICD Terraform solutions for businesses.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks