Terraform: Up & Running (3rd Edition)
by Yevgeniy Brikman · O'Reilly Media
Practitioner book on writing infrastructure as code with Terraform 1.x. Covers state management and locking, reusable modules, loops and conditionals, secrets handling, automated testing, and running Terraform safely as a team in production.
This link may earn us a small commission at no extra cost to you. Affiliate disclosure
More resources on Terraform & Ansible
Ansible 101 (Jeff Geerling)
Fifteen one-hour episodes walking through Ansible for DevOps: ad-hoc commands, inventory, playbooks, roles, Ansible Galaxy, testing with Molecule, security hardening, AWX/Tower, dynamic inventory and Windows automation, all with live examples. It's the best free guided path for Ansible.
Ansible Community Documentation: Getting Started and Playbook Guide
The authoritative reference for playbook and role semantics; pairs with Geerling's book/videos for the narrative path. Official Ansible documentation. The getting-started section explains control nodes, inventories, modules and a first playbook; the linked playbook guide covers variables, handlers, conditionals, loops, roles, collections and recommended project layout.
A Comprehensive Guide to Terraform
Free six-part article series adapted from Terraform: Up & Running. Compares Terraform with Ansible, Chef, Pulumi and CloudFormation, then covers fundamentals, state management, modules, loops and conditionals, and using Terraform as a team.