Course 815:
Hands-On Terraform

(2 days)

 

Course Description

Infrastructure as Code (IaC) is the process of creating computing infrastructure and deploying applications and databases using scripts and configuration. Terraform is a cross-platform IaC tool that works with major cloud providers like AWS, Azure, and Google Cloud, as well as on-premises. This course teaches everything you need to get started using Terraform from the basics of the language to advanced deployment techniques. The course includes examples, demos, and hands-on labs using AWS, Azure, Google Cloud, and Kubernetes.

Learning Objectives

  • Automate the creation, management, and destruction of computing infrastructure and resources using Terraform
  • Create infrastructure as code with HashiCorp Configuration Language (HCL)
  • Provision AWS, Azure, and Google Cloud resources using Terraform
  • Build complex, reusable deployments using Terraform modules
  • Leverage Terraform to deploy Kubernetes applications
  • Simplify using Terraform in teams using Terraform Cloud

Who Should Attend

Engineers, developers, architects, and anyone else who would like to use Terraform to automate infrastructure provisioning and application deployment for the cloud or Kubernetes.

Hands-On Activities

This class includes hands-on labs using AWS, Azure, and Google Cloud. The class ends with an unguided workshop that challenges students to use what they have learned to deploy infrastructure and an application to the environment of their choice.


Course Outline

Module 1: Getting Started with Terraform

  • Terraform Overview
    • Infrastructure as Code
    • IaC Tools
    • Why Terraform?
  • Installation
    • Terraform Binary
    • System Prerequisites
    • AWS CLI
    • Azure CLI
    • Google Cloud CLI
  • Terraform Cloud
  • Lab: Installing Terraform

Module 2: Terraform Essentials

  • Providers
    • Overview of Providers
    • Authentication
    • AWS Provider
    • Azure Provider
    • Google Provider
  • Folder Structure
    • .tf Files
    • Resources
    • Variables
    • .tfvars Files
    • Output
  • Workflow 
    • Init
    • Plan
    • Apply
    • Show
    • Change
    • Destroy
    • Running External Scripts
  • Managing State
    • .tfstate Files
    • Managing Drift
  • Lab: Getting Started with Terraform

Module 3: HashiCorp Configuration Language (HCL)

  • Basic Syntax
    • Modules
    • Blocks
    • Declaring Variables
    • Primitive Data Types
    • Collection Types
    • Complex Types
    • Setting Variable Values
    • Data Blocks
    • Interpolation Expressions
    • Resource Dependencies
    • Output Variables
  • Creating Multiple Resources
    • Count
    • Sets
    • For-Each
    • For
    • Dynamic Blocks
    • Generating Random Values
  • Built-in Functions
    • String
    • Numeric
    • Date and Time
    • Collection
  • Reverse Engineering Templates
    • Importing Existing Resources
    • Terraformer
  • Lab: Understanding HCL

Module 4: Building Cloud Infrastructure

  • Networks
    • AWS VPCs
    • Azure VPCs
    • Google Cloud VPCs
  • Virtual Machines
    • EC2
    • Azure VMs
    • Compute Engine
  • Storage
    • S3
    • Azure Storage
    • Google Cloud Storage
  • Databases
    • RDS
    • Cloud SQL 
    • Azure SQL
  • Lab: Building Cloud Infrastructure

Module 5: Deploying Scalable, Fault-Tolerant Solutions

  • Architecting Cloud Applications
    • Regions and Zones
    • Managing Multiple Instances
    • Firewalls
    • Load Balancers
  • Deploying Applications to AWS
    • VPC with Multiple Availability Zones
    • Security Groups
    • Load Balancers
  • Deploying Applications to Azure
    • Virtual Networks
    • Security Groups
    • Load Balancers
  • Deploying Applications to Google Cloud
    • VPC with Multiple Regions
    • Firewall Rules
    • Load Balancers
  • Lab: Deploying a Scalable, Fault-Tolerant Application with Terraform

Module 6: Modularizing Terraform Deployments

  • Modules Revisited
    • Terraform Modules
    • Input
    • Resources
    • Output
  • Building Modular Deployments
    • Folder Hierarchy
    • Using Modules
    • Passing Parameters to Modules
    • Handling Dependencies between Modules
  • Lab: Modularizing a Complex Deployment

Module 7: Deploying to Kubernetes with Terraform

  • Kubernetes Basics
    • Clusters
    • Deployments
    • Kubernetes Configuration
    • Deploying Kubernetes Applications with kubectl
  • Creating Kubernetes Clusters with Terraform
    • EKS Clusters
    • AKS Clusters
    • GKE Clusters
  • Terraform Kubernetes Provider
    • Translating Kubernetes Syntax to HCL
    • Deploying a Kubernetes Application Using Terraform
  • Lab: Deploying to Kubernetes Using Terraform

Module 8: Terraform Cloud

  • Using Terraform Cloud
    • Features
    • Creating an Account
    • Organizations
    • Workspaces
  • Lab: Using Terraform Cloud

Module 9: Terraform Workshop

 

Please Contact Your ROI Representative to Discuss Course Tailoring!