From the course: Terraform: Managing Network Infrastructure

Terraform's composition

- [Instructor] Before you drive a car, you need to understand a few fundamental mechanics of its operation. How do you start the vehicle and how do you turn it off? Which pedal does the acceleration and which pedal does the braking? How about putting it in park or reverse? Without knowing these things, you can imagine how much trouble you could get yourself into. In this video, we're going to examine some of the basic mechanics of Terraform. The road to success is always under construction. So what is Terraform? It's an open source tool used to build, modify, and version control infrastructure. Now, this infrastructure is defined using declarative human-readable configuration files, and Terraform interfaces with other platforms and services through application programming interfaces. Terraform has two main components, the first of which is Terraform Core, and this operates as an entry point for using Terraform. And then you have providers, which are essentially a logical abstraction of an upstream API. Providers are developed using plug-ins, and these plug-ins are executed as a separate process and interact with the main Terraform binary using RPC, which is a method of building client server-based applications in distributed fashion. You can go and check out the source code for both Terraform Core, and in this example, the AWS Terraform provider, at their respective GitHub repositories. Now, these providers are published on Terraform Registry, and I want to dig in a little bit with Terraform Registry here. So how is Terraform different? To really understand this, we need to examine how network infrastructure typically gets configured today, and that is in a mutable and imperative fashion, which means infrastructure gets deployed and then while it's already running, it gets configured and modified over its lifecycle. Think of it like this. I'm a network engineer and I deploy several virtual routers. Once they're up, I connect to them and bang away at that CLI, getting things the way that I want it, or or maybe I even run a script or some tool that connects to them after the fact and modifies the configuration as needed. Now, Terraform, on the other hand, takes a different approach, a declarative approach. This means that all the configuration is defined prior to deployment, at build time, and that resource is delivered intact. In this video, we learned some of the basic mechanics of what makes Terraform tick. You should also have a basic understanding of what Terraform Core is and how it interacts with providers, and what makes Terraform different. If you have those boxes checked, then let's hop over to the next lesson.

Contents