Jump to ratings and reviews
Rate this book

Terraform Cookbook: Provision, run, and scale cloud architecture with real-world examples using Terraform

Rate this book
Explore how to provision, manage, and scale your infrastructure using Infrastructure as Code (IaC) with Terraform
Purchase of the print or Kindle book includes a free PDF eBook


Key FeaturesGet up and running with the latest version of Terraform (v1+) CLIDiscover how to deploy Kubernetes resources with TerraformLearn how to troubleshoot common Terraform issuesBook DescriptionHashiCorp Configuration Language (HCL) has changed how we define and provision data center infrastructure with the launch of Terraform, a top-tier product for building Infrastructure as Code (IaC). Terraform Cookbook shows you how to leverage Terraform to manage complex infrastructure with ease.

This new edition has been updated to include real-world examples for provisioning Azure, AWS and GCP infrastructure with Terraform. You'll delve into manual and automated testing with Terraform configurations, creating and managing a balanced, efficient, and reusable infrastructure with Terraform modules. You'll learn how to automate the deployment of Terraform configuration with continuous integration and continuous delivery (CI/CD).
Besides that, several new chapters have been added that describe the use of Terraform for Docker and Kubernetes, examine advanced topics on GitOps practices, and explain how to test Terraform configurations using different tools to check code and security compliance. The final chapter covers troubleshooting common Terraform issues and provides solutions for frequently encountered errors.

By the end of this book, you'll have developed the skills needed to get the most value out of Terraform and to effectively manage your infrastructure.What you will learnUse Terraform to build and run cloud and Kubernetes infrastructure using IaC best practicesAdapt the Terraform command line adapted to appropriate use casesAutomate the deployment of Terraform confi guration with CI/CDDiscover manipulation of the Terraform state by adding or removing resourcesExplore Terraform for Docker and Kubernetes deployment, advanced topics on GitOps practices, and Cloud Development Kit (CDK)Add and apply test code and compliance security in Terraform configurationDebug and troubleshoot common Terraform errorsWho this book is forThis book is for developers, operators, and DevOps engineers looking to improve their workflow and use Infrastructure as Code. Experience with Microsoft Azure, Jenkins, shell scripting, and DevOps practices is required to get the most out of this Terraform book.

Table of ContentsSetting Up the Terraform EnvironmentWriting Terraform ConfigurationsScaling Your Infrastructure with TerraformUsing Terraform with External DataManaging Terraform StateApplying a Basic Terraform WorkflowSharing Terraform Configuration with ModulesProvisioning Azure Infrastructure with TerraformProvisioning Simple AWS and GCP Infrastructure Using TerraformUsing Terraform for Docker and Kubernetes DeploymentRunning Test and Compliance Security on Terraform ConfigurationDeep-Diving into TerraformAutomating Terraform Execution in a CI/CD PipelineUsing Terraform Cloud to Improve Team CollaborationTroubleshooting Terraform ErrorsAppendix Terraform Cheat

634 pages, Kindle Edition

Published August 31, 2023

7 people are currently reading
7 people want to read

About the author

Mikael Krief

4 books1 follower

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
0 (0%)
4 stars
1 (20%)
3 stars
2 (40%)
2 stars
2 (40%)
1 star
0 (0%)
Displaying 1 of 1 review
Profile Image for Werner Dijkerman.
4 reviews1 follower
December 24, 2023
Normally I don't read any cookbook. Years ago I have read a few of them, but I had some issues while reading it. I started to read the books (from the beginning) and I had no clue from what was going on. After a few of these books, I switched to the more traditional books. Having an (good) introduction and start with the basics was for me the better way to learn.

But then I was asked to read and do a review of a cookbook. And so I started the read the Terraform Cookbook. And to be honest, it turned out to be good one. The book starts with installing Terraform on the various operating systems. But also like how to use Terraform with for example a Docker container, when you don't want to install it. It followed with explanations of the syntax and how to use it. Like using resources, variables and outputs. The chapters themself are written and explained very good.

Each chapter that followed, we learned something new. And I got that vibe of reading a traditional book again with this cookbook. What I really do like is that quite early in the book we focussed on the Terraform state. I also learned some new things with this chapter about the Terraform state. Using resources from a different state in your new setup, never had to use this so far. Maybe I will now with new projects, who knows? :)

Azure is used as the cloud provider on which you create your resources throughout the book. But no worries if you don't have (any) experience with using Azure. A lot of explanation is provided to help you understand what you just accomplished. There is also a chapter that will create resources in both AWS as Google (Next to Azure), so no worries.

Funny thing though, manual actions/scripts are used for creating the resources to store the Terraform State! I would have used Terraform for that, well, as it is a Terraform cookbook. I personally liked Chapter 11: running tests and compliance security on Terraform. It gave me some nice ideas on what and how I can apply them myself in my projects. But also what not to do, I like Python but that way of testing makes it more complicated.

Overall, I am very happy with the Terraform Cookbook. It explains a lot of things about Terraform and I learned as an experienced user also some new things. So this book is for sure a very good book to learn Terarform. Not only for someone that hasn't worked with Terraform before, also the more experienced like I am will learn from it. And with over 600 pages of information, there will be something that will be new to you.
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.