Terraform in Depth you own this product

Infrastructure as Code with Terraform and OpenTofu
Robert Hafner
  • MEAP began September 2023
  • Publication in February 2025 (estimated)
  • ISBN 9781633438002
  • 488 pages (estimated)
  • printed in black & white

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Look inside
An in-depth guide to everything Terraform, complete with newly established best practices and experienced insights into Infrastructure as Code.

Terraform, and its new open source fork OpenTofu, practically eliminates manual infrastructure configuration, making it possible to script and automate almost every aspect of system management and administration. Its “Infrastructure as Code (IaC)” approach has a simple-yet-awesome premise: provision, update, scale, and replicate your infrastructure with the same ease as your application code. In Terraform in Depth, you’ll discover absolutely everything you need to automate and manage your infrastructure with just a few lines of code.

Inside Terraform in Depth, you’ll learn how to:

  • Understand and write basic Terraform code
  • Avoid vendor lock-in with the open source OpenTofu
  • Switch between OpenTofu and Terraform as needed
  • Construct continuous integration and continuous delivery (CI/CD) pipelines with Terraform
  • Organize Terraform projects and modules for team-based, production use
  • Develop and test robust Terraform modules
  • Create custom Terraform providers

Terraform in Depth is fully up to date with the latest versions, standards, and approaches of Terraform and OpenTofu. Complete and comprehensive, its one-stop approach covers everything from Terraform and OpenTofu’s absolute basics all the way to advanced production uses. Every technique is illustrated with the kind of real-world examples infrastructure engineers encounter every day.

about the book

Terraform in Depth teaches you to effectively create and manage your infrastructure as Terraform code. Inside, you’ll find essential insights into modern Terraform, including newly established patterns, best practices, and methods for empowering your development team with IaC. Each chapter is fully illustrated with hands-on examples, such as creating a flexible Terraform module to launch EC2 instances and debugging complex Terraform plans.

Starting with the basics of reading and writing Terraform code, you’ll quickly be able to define your infrastructure with Terraform and create reusable instances of your projects. Next, you’ll dive into Terraform’s advanced functions—including CI/CD pipelines, registries to distribute modules, and utilizing built-in tools for documentation, security, and module quality. Finally, you’ll learn the secrets of Terraform code management, including rules for refactoring, testing modules, and advanced module patterns.

about the reader

For sysadmin and cloud engineers familiar with the CLI.

about the author

Robert Hafner has led engineering efforts at numerous startups, including Malwarebytes, Vicarious AI, and Rad AI. He is currently a Senior Principal Architect at a Fortune 100 Telecom in their Developer Experience organization. In his career, he has built large-scale infrastructure with reliability typically reserved for large organizations, while utilizing small, focused teams. When he’s not working with computers, he’s creating resin art or trying something new in the kitchen. He lives in Chicago with his amazing wife and two cats.

choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Terraform in Depth ebook for free

choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Terraform in Depth ebook for free