Terraform in Depth

Robert Hafner

Terraform in Depth
Format
Paperback
Publisher
Manning Publications
Published
25 February 2025
Pages
488
ISBN
9781633438002

Terraform in Depth

Robert Hafner

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.

Order online and we’ll ship when available (25 February 2025)

Our stock data is updated periodically, and availability may change throughout the day for in-demand items. Please call the relevant shop for the most current stock information. Prices are subject to change without notice.

Sign in or become a Readings Member to add this title to a wishlist.