
Explore the origins and purpose of TerraForm as an infrastructure as code tool, how TerraForm works, the TerraForm registry and providers, and guided installs on macOS and Linux.
Learn how terraform works as infrastructure as code, using providers to manage resources via API calls from hcl configuration files with a .tf extension, where resources have arguments and attributes.
Install Terraform on macOS by downloading the official binary, unzipping, creating a home bin directory, exporting the PATH in the bash profile, and verifying the install with terraform version.
install terraform on linux uses same steps as mac. download the zip from terraform.io, unzip it, create a bin folder in your home, export path, and source your bash profile.
Review the basics of terraform as infrastructure as code, its registry and provider types, and the installation steps for macOS and Linux, plus how it differs from configuration management tools.
Explore the Terraform configuration file syntax, including the .tf extension, blocks with opening and closing brackets, and pound sign comments that define declarative configurations and high-level behavior.
Explore Terraform basics by defining the root module in main.tf, recognizing the .tf extension, and using the T alias with validate, fmt, and init to manage configurations.
Review how Terraform interacts with providers to provision resources, including the AWS provider and provider plugins; configure a Kubernetes provider and IAM user with programmatic access.
Create an AWS IAM group with Terraform by defining a resource and providing name and path, then use plan and apply to realize the desired state.
Learn how to bring existing AWS IAM groups into Terraform managed infrastructure using the Terraform import command, defining IAM group resources and importing production, staging, and development groups.
Demonstrates how a Terraform state file records version, serial, lineage, outputs, and resources, and shows how destroy cleans up resources and updates the AWS management console.
Demonstrates creating an AWS IAM user in Terraform with a tags block using key value pairs for name, job, and department, then validate, plan, and apply.
Learn to export all tags for an IAM user as a Terraform output, including resource tags and provider inherited tags, using an output block.
Use the Terraform console to inspect variables, pull list items by zero-based indices, and validate, plan, and apply with auto-approve to create three users.
Learn how the Terraform count meta argument creates multiple similar resources, using count.index to distinguish each instance, enabling separate update, delete, and management of IAM users or other resource types.
Explore how to use the splat expression in Terraform to pull attributes from multiple similar resources, such as IAM users, in one command.
Initialize the Terraform project by configuring the AWS provider in providers.tf, validate, format, and initialize, then run a plan to confirm no resources exist before creating them.
Create your first AWS VPC, a virtual private cloud with an IPv4 CIDR block like 172.31.0.0/16 and a default VPC. Understand the VPC dashboard, IPv4, IPv6, and DHCP options basics.
Create an AWS VPC with Terraform by copying a provider example, configure the CIDR block and tags, validate, apply with auto-approve, and inspect the resulting VPC.
Learn how to refactor Terraform subnet creation by using a single resource with the count meta-argument, driven by lists of CIDR blocks, AZs, and public IP flags.
build a terraform route table for a vpc, add a route to the internet via an igw, and validate, plan, and apply the configuration.
Learn how to use Terraform data sources to retrieve AWS VPC information, such as CIDR blocks and VPC IDs, by querying with CIDR or ID and exposing outputs.
Retrieve vpc information using terraform data sources and outputs, tagging with dns port and owner id. Apply filters to identify public subnets for final associations.
Learn how security groups protect a resource within a VPC with inbound and outbound rules, enabling ssh and http access from the internet, and implement these in Terraform.
Rewrite the security group with a single dynamic ingress block built from a set of map objects, replacing two ingress blocks, while preserving the separate egress block and CIDR rules.
Provision an aws ec2 instance with terraform by selecting an ami, adding a name tag, and dynamically resolving region-specific ami ids to avoid hardcoding, security group and key pair included.
Create an ec2 instance with terraform by configuring the name and type, using vpc and ami data sources, and applying to obtain the web server's public ip.
Demonstrates using terraform's file provisioner to copy a script to an ec2 host via ssh, configuring source and destination, with timeout handling and continued execution on failure.
Define a Terraform variables.tf EBS volumes list to provision two GP3 volumes with 3000 IOPS and 125 throughput, tagged web and data, and prepare for EC2 attachment.
Practice safe cloud teardown by destroying EC2 instances, EBS volumes, security groups, and SSH key pairs using Terraform, ensuring all resources are cleanly removed.
Course Overview
Welcome to this amazing course on Terraform where you will learn how to manage your infrastructure as a code. Terraform is one of the most popular tool of choice for DevOps Engineers because it is platform agnostic, it can work with any provider either it would be GCP, Microsoft Azure, AWS, Kubernetes, Docker, etc.
You will learn how to interact with all of these providers, how to create resources, and how to automate managing the Infrastructure as a Code(IaC) using Terraform and much more!
Course Sections
Section 1: Course Introduction
Section 2: Terraform Introduction
Section 3: Terraform Basics
Section 4: AWS Provider Basics
Section 5: Providers Authentication & Configuration
Section 6: AWS CLI
Section 7: Terraform Building Blocks
Section 8: Terraform Variables
Section 9: Terraform and AWS - Network Stack Project
Section 10: Terraform and AWS - EC2 Web Server Project
Section 11: Terraform and DigitalOcean
Section 12: Terraform and Docker
Section 13: Terraform Modules
Section 14: Managing Terraform State
Section 15: Terraform and Kubernetes
Section 16: Course Completion
Course Updates
Note: The sections of this course are not static, there will be constant updates to all the sections, we will be adding more sections, more lessons to existing sections, on a monthly basis.
Course Updates January 2025
Note: I will be re-shuffling this course by adding more new lessons and archiving some older lessons.
Course Updates April 2025
Note: Following lessons were added:
* Installing Terraform on Ubuntu
* Installing Terraform on Amazon Linux 2023
* Upgrading Terraform