The Terraform Book

0.1 Who is this book for?

This book is a hands-on introduction to Terraform. The book is for engineers, developers, sysadmins, operations staff, and those with an interest in infrastructure, configuration management, or DevOps. It assumes no prior knowledge of Terraform. If you’re a Terraform guru, you might find some of this book too introductory.

There is an expectation that the reader has basic Unix/Linux skills and is familiar with Git version control, the command line, editing files, installing packages, managing services, and basic networking.

An Amazon Web Services account and a basic understanding of how Amazon Web Services works is also useful. It would be relatively easy, however, to recreate the book’s examples to use platforms like Google Cloud Platform or Azure.

Some of the examples in this book that use Amazon Web Services will cost you money—not a lot of money, but some. Y’all have been warned.

Finally, Terraform is evolving quickly and is currently in a pre-1.0.0 release state. That means “Here Be Dragons,” and you should take care when using Terraform in production.

The book assumes you are using Terraform 0.12.3 or later. Earlier versions may not work as described.

0.2 Credits and Acknowledgments

  • Ruth Brown, who continues to humor these books and my constant tap-tap-tap of keys late into the night.
  • Stephanie Coleman, for her friendship and good humor.
  • Paul Stack, who answered many dumb questions.
  • John Vincent and Dean Wilson, whose experiments with Terraform infrastructure testing were very useful.

Terraform™ is a registered trademark of HashiCorp, Inc.

0.3 Technical Reviewers

0.3.1 Jennifer Davis

Jennifer is the co-author of Effective DevOps. She is a core organizer for devopsdays, co-organizer of devopsdays Silicon Valley, and the founder of Coffeeops. She blogs occasionally on jendavis.org and contributes content to SysAdvent and AWS Advent. She has spoken at a number of industry conferences about DevOps, tech culture, monitoring, and automation. In her role as an engineer at Chef, Jennifer develops Chef cookbooks to simplify building and managing infrastructure. When she’s not working, she enjoys hiking Bay Area trails, learning to make things, and quality time with Brian and George. Find her on Twitter: @sigje.

0.3.2 Thom May

Thom is an operations engineer with a keen interest in getting code to our customers as safely as possible. When he’s not doing open source for Chef, he’s generally skiing, running, or eating. Thom (re)tweets at @thommay.

0.3.3 Peter Miron

Pete Miron scales engineering teams and software systems. He’s currently building software to make it easier for engineering teams to scale software systems at Apcera. Find him on Twitter: @petemiron.

0.3.4 James Nugent

James is an engineer at HashiCorp. He has been a long standing contributor to open source, including a contributor to both Packer and Terraform. He is now focusing on Terraform full time and ensuring the project continues to grow with its community.

Prior to HashiCorp, James was an architect at Boundary building a SaaS around network profiling and monitoring, where huge amounts of data had to be collected, aggregated and analyzed in real time. In his free time, he is a contributor to EventStore, working on a database to do Complex Event Processing.

When James isn’t working, he is often traveling for both pleasure and open source evangelism. He is a vintage guitar, recording equipment collector, and a coffee connoisseur.

0.3.5 Paul Stack

Paul Stack is an infrastructure coder who is passionate about continuous integration, continuous delivery, good operational procedures, and how they should be part of what developers and system administrators do on a day-to-day basis. He believes that reliably delivering software is as important as its development.

0.4 Editor

Sid Orlando is a writer and editor (among some other things), currently word-nerding out as Managing Editor at Kickstarter. She may or may not be experiencing recurring dreams about organizing her closet with dreamscape Docker containers. Find her on Twitter: @ohreallysid.

0.5 Author

James is an author and engineer. His most recent books are The Packer Book; The Terraform Book; The Art of Monitoring; The Docker Book, about the open-source container virtualization technology; and The Logstash Book, about the popular open-source logging tool. James also authored two books about Puppet, Pro Puppet and Pulling Strings with Puppet . He is the author of three other books: Pro Linux System Administration, Pro Nagios 2.0, and Hardening Linux.

He is currently CTO at Emaptico and was formerly CTO at Kickstarter, VP of Services and Support at Docker, VP of Engineering at Venmo, and VP of Technical Operations at Puppet. He likes food, wine, books, photography, and cats. He is not overly keen on long walks on the beach or holding hands.

0.6 Conventions in the book

This is an inline code statement.

This is a code block:

This is a code block

Long code strings are broken. If you see . . . in a code block it indicates that the output has been shortened for brevity’s sake.

0.7 Code and Examples

The code and example configurations contained in the book are available on GitHub at:

https://github.com/turnbullpress/tfb-code

0.8 Colophon

This book was written in Markdown with a large dollop of LaTeX. It was then converted to PDF and other formats using PanDoc (with some help from scripts written by the excellent folks who wrote Backbone.js on Rails).

0.9 Errata

Please email any errata you find to [email protected].

0.10 Disclaimer

This book is presented solely for educational purposes. The author is not offering it as legal, accounting, or other professional services advice. While best efforts have been used in preparing this book, the author makes no representations or warranties of any kind and assumes no liabilities of any kind with respect to the accuracy or completeness of the contents and specifically disclaims any implied warranties of merchantability or fitness of use for a particular purpose. The author shall not be held liable or responsible to any person or entity with respect to any loss or incidental or consequential damages caused, or alleged to have been caused, directly or indirectly, by the information or programs contained herein. Every company is different and the advice and strategies contained herein may not be suitable for your situation. You should seek the services of a competent professional before beginning any infrastructure project.

0.12 Version

This is version v1.5.0 (faad024) of The Terraform Book.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.102.182