1 A brief overview of Terraform
This chapter covers
- Basic Terraform Components
- Introducing Infrastructure as Code
- Defining Declarative Languages
- A brief overview of Graphs
- The Terraform Deployment Workflow
The first time I set up an AWS VPC, which is the system AWS uses to isolate networks from each other, by hand it took me several days. Admittedly I had never done it before so there was some research involved, but even once I’d done it a few times it still took several hours to manually create and configure a VPC that spanned multiple availability zones and had both public and private subnets.
When I first discovered Terraform I attempted to build a VPC again. Instead of creating it manually, I wrote code using the Terraform language to describe my VPC and all of the components that it needed. When I first ran the code it’s not an exaggeration to say I was blown away- Terraform launched over 70 resources needed to create that highly available VPC Structure and it did it in about a minute. From then on whenever I needed a VPC it was a simple matter of reusing that already written code.