Getting Started with Terraform - Second Edition

Build, Manage and Improve your infrastructure effortlessly
Preview in Mapt

Getting Started with Terraform - Second Edition

Kirill Shirinkin

Build, Manage and Improve your infrastructure effortlessly
Mapt Subscription
FREE
$29.99/m after trial
eBook
$16.80
RRP $23.99
Save 29%
Print + eBook
$29.99
RRP $29.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$16.80
$29.99
$29.99 p/m after trial
RRP $23.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Getting Started with Terraform - Second Edition Book Cover
Getting Started with Terraform - Second Edition
$ 23.99
$ 16.80
Sonar Code Quality Testing Essentials Book Cover
Sonar Code Quality Testing Essentials
$ 29.99
$ 21.00
Buy 2 for $34.30
Save $19.68
Add to Cart

Book Details

ISBN 139781788623537
Paperback208 pages

Book Description

Terraform is a tool used to efficiently build, configure, and improve the production infrastructure. It can manage the existing infrastructure as well as create custom in-house solutions.

This book shows you when and how to implement infrastructure as a code practices with Terraform. It covers everything necessary to set up the complete management of infrastructure with Terraform, starting with the basics of using providers and resources. It is a comprehensive guide that begins with very small infrastructure templates and takes you all the way to managing complex systems, all using concrete examples that evolve over the course of the book. The book ends with the complete workflow of managing a production infrastructure as code—this is achieved with the help of version control and continuous integration. The readers will also learn how to combine multiple providers in a single template and manage different code bases with many complex modules. It focuses on how to set up continuous integration for the infrastructure code.

The readers will be able to use Terraform to build, change, and combine infrastructure safely and efficiently.

Table of Contents

Chapter 1: Infrastructure Automation
What is Infrastructure as Code and why is it needed?
Declarative versus procedural tools for Infrastructure as Code
Infrastructure as Code in the Cloud
Requirements for infrastructure provisioner
Which tools exist for infrastructure provisioning?
A short overview of Terraform
Journey ahead and how to read this book
Summary
Chapter 2: Deploying First Server
History of Terraform
Preparing work environment
The many Terraform providers
Short introduction to AWS
Using Elastic Compute Cloud
Configuring AWS provider
Creating an EC2 instance with Terraform
Working with state
Handling resource updates
Destroying everything we've built
Summary
Chapter 3: Resource Dependencies and Modules
Creating an AWS Virtual Private Cloud
Understanding dependency graph
Playing with Terraform graphs
Controlling dependencies with depends_on and ignore_changes
Making sense of our template
Removing duplication with modules
Configuring modules
Retrieving module data with outputs
Using root module outputs
Summary
Chapter 4: Storing and Supplying Configuration
Understanding variables
Configuring data sources
Exploring Terraform configuration resources
Taking a quick look at Consul
Summary
Chapter 5: Connecting with Other Tools
Returning data with outputs
Testing servers with Inspec
Provisioners
Reprovisioning machines with null_resource
Using third-party plugins
Summary
Chapter 6: Scaling and Updating Infrastructure
Counting servers
Bringing in high availability
Load balancing and simulating conditionals
Immutable infrastructure
Baking images with Packer
Rolling out AMI upgrades with Terraform
Performing blue-green deployments
Refreshing infrastructure
Importing resources
Summary
Chapter 7: Collaborative Infrastructure
Version control with Git 101
Moving templates to Git
Protecting secrets in a Git repository
Storing state files remotely
Connecting remote states together
Storing modules remotely
Locking state files with Terragrunt
Moving infrastructure updates to the CI pipeline
Integration testing of Terraform modules
Summary
Chapter 8: Future of Terraform
Infrastructure as code and Terraform replacements
Learning AWS and compiling Terraform
Learning Consul
Provisioning and configuration management
Immutable infrastructure
Collaboration and CI/CD
The many tools around Terraform
The rapid development of Terraform
Closing thoughts on the future of Terraform
Summary

What You Will Learn

  • Understand what Infrastructure as Code (IaC) means and why it matters
  • Install, configure, and deploy Terraform
  • Take full control of your infrastructure in the form of code
  • Manage complete infrastructure, starting with a single server and scaling beyond any limits
  • Discover a great set of production-ready practices to manage infrastructure
  • Set up CI/CD pipelines to test and deliver Terraform stacks
  • Construct templates to simplify more complex provisioning tasks

Authors

Table of Contents

Chapter 1: Infrastructure Automation
What is Infrastructure as Code and why is it needed?
Declarative versus procedural tools for Infrastructure as Code
Infrastructure as Code in the Cloud
Requirements for infrastructure provisioner
Which tools exist for infrastructure provisioning?
A short overview of Terraform
Journey ahead and how to read this book
Summary
Chapter 2: Deploying First Server
History of Terraform
Preparing work environment
The many Terraform providers
Short introduction to AWS
Using Elastic Compute Cloud
Configuring AWS provider
Creating an EC2 instance with Terraform
Working with state
Handling resource updates
Destroying everything we've built
Summary
Chapter 3: Resource Dependencies and Modules
Creating an AWS Virtual Private Cloud
Understanding dependency graph
Playing with Terraform graphs
Controlling dependencies with depends_on and ignore_changes
Making sense of our template
Removing duplication with modules
Configuring modules
Retrieving module data with outputs
Using root module outputs
Summary
Chapter 4: Storing and Supplying Configuration
Understanding variables
Configuring data sources
Exploring Terraform configuration resources
Taking a quick look at Consul
Summary
Chapter 5: Connecting with Other Tools
Returning data with outputs
Testing servers with Inspec
Provisioners
Reprovisioning machines with null_resource
Using third-party plugins
Summary
Chapter 6: Scaling and Updating Infrastructure
Counting servers
Bringing in high availability
Load balancing and simulating conditionals
Immutable infrastructure
Baking images with Packer
Rolling out AMI upgrades with Terraform
Performing blue-green deployments
Refreshing infrastructure
Importing resources
Summary
Chapter 7: Collaborative Infrastructure
Version control with Git 101
Moving templates to Git
Protecting secrets in a Git repository
Storing state files remotely
Connecting remote states together
Storing modules remotely
Locking state files with Terragrunt
Moving infrastructure updates to the CI pipeline
Integration testing of Terraform modules
Summary
Chapter 8: Future of Terraform
Infrastructure as code and Terraform replacements
Learning AWS and compiling Terraform
Learning Consul
Provisioning and configuration management
Immutable infrastructure
Collaboration and CI/CD
The many tools around Terraform
The rapid development of Terraform
Closing thoughts on the future of Terraform
Summary

Book Details

ISBN 139781788623537
Paperback208 pages
Read More

Read More Reviews

Recommended for You

Sonar Code Quality Testing Essentials Book Cover
Sonar Code Quality Testing Essentials
$ 29.99
$ 21.00
Apache Tomcat 7 Essentials Book Cover
Apache Tomcat 7 Essentials
$ 23.99
$ 16.80
Understanding Software Book Cover
Understanding Software
$ 23.99
$ 16.80
Instant LinkedIn Customization How-to Book Cover
Instant LinkedIn Customization How-to
$ 9.99
$ 7.00
Digital Forensics with Kali Linux Book Cover
Digital Forensics with Kali Linux
$ 31.99
$ 22.40
Unity Virtual Reality Projects - Second Edition Book Cover
Unity Virtual Reality Projects - Second Edition
$ 39.99
$ 28.00