Video Thumbnail for Lesson
2.1: Terraform Overview

Terraform Overview

Terraform is a powerful Infrastructure as Code (IaC) tool that allows you to build, change, and version infrastructure safely and easily.

In this lesson, we will provide an overview of Terraform and explain how it can be set up and authorized with AWS. We will also discuss the benefits of using Terraform and its compatibility with various cloud providers and services.

Benefits of Terraform:

  • Apply software development best practices to infrastructure management.
  • Utilize version control to track infrastructure changes over time.
  • Cloud-agnostic approach allows for compatibility with multiple cloud providers and services.
  • Interact with almost any online service with an API.

Terraform with Other Tools:

Terraform can be used in conjunction with other IaC tools to create powerful and flexible infrastructure management solutions. Some common patterns include:

  1. Terraform + Configuration Management Tools (e.g., Ansible):

    • Terraform provisions virtual machines
    • Ansible installs and configures dependencies inside virtual machines.
  2. Terraform + Templating Tools (e.g., Packer):

    • Terraform provisions servers.
    • Packer builds the image from which virtual machines are created.
  3. Terraform + Orchestration Tools (e.g., Kubernetes):

    • Terraform provisions Kubernetes clusters.
    • Kubernetes defines how the application is deployed and managed on the cloud resources.

Terraform Architecture:

Architecture diagram for web application

Terraform consists of two main components:

a. Terraform Core:

  • The engine that processes configuration files and manages the Terraform state file.
  • Responsible for interacting with cloud provider APIs to make the current state match the desired configuration.

b. Terraform Providers:

  • Plugins for Terraform Core that allow it to interact with specific cloud providers and services.
  • Map configuration and state information to the appropriate API calls.
  • Over 100 providers available for various cloud providers and services.

In the next lesson, we will walk you through setting up Terraform on your system and configuring it to work with AWS.