Skip to main content

Terraform : From First Plan to Production

Learn Terraform from zero: HCL, providers, state, variables, modules, loops and CI/CD, then build Docker and AWS infrastructure in hands-on labs.

~2.5 hours
14 Topics
Hands-on Scenarios

What You'll Learn

Understanding Why Terraform Exists

Tuesday, 11:40 AM. A cloud region is having a bad day, and leadership asks a simple question: "Can we bring the payments stack up in another region...

Understanding How Terraform Works

What are Terraform core, providers and state? Terraform has three parts.

Setting Up Terraform and Your First Configuration

How do you install Terraform? Terraform is a single program with no dependencies. Install it with your system's package manager so updates are easy.

Writing HCL Blocks, Arguments and Expressions

What are blocks, arguments and attributes? HCL is built from three pieces. A block is a container with a type, optional labels and a body in braces.

Building AWS Infrastructure with Providers, Resources and Data Sources

How do you configure the AWS provider? The terraform block declares which providers you need and which versions are allowed.

Making Configs Reusable with Variables, Locals and Outputs

How do input variables work? An input variable is a parameter for your configuration, like a function argument.

Skills You'll Master

TERRAFORMINFRASTRUCTURE-AS-CODEIACHCLSTATE-MANAGEMENTAWS

Curriculum Index14 topics

1

Understanding Why Terraform Exists

Tuesday, 11:40 AM. A cloud region is having a bad day, and leadership asks a simple question: "Can we bring the...

2

Understanding How Terraform Works

What are Terraform core, providers and state? Terraform has three parts.

3

Setting Up Terraform and Your First Configuration

How do you install Terraform? Terraform is a single program with no dependencies.

4

Writing HCL Blocks, Arguments and Expressions

What are blocks, arguments and attributes? HCL is built from three pieces.

5

Building AWS Infrastructure with Providers, Resources and Data Sources

How do you configure the AWS provider? The terraform block declares which providers you need and which versions are...

6

Making Configs Reusable with Variables, Locals and Outputs

How do input variables work? An input variable is a parameter for your configuration, like a function argument.

7

Managing Terraform State Safely

What is state and why does Terraform need it?

8

Repeating and Deciding with count, for_each and Conditionals

When should you use count? The count meta-argument creates several copies of one resource from a number.

9

Organizing Infrastructure with Modules

What is a module and why use one? A module is a folder of .tf files that you call with inputs and that returns outputs...

10

Controlling Resource Lifecycles and Dependencies

How does the lifecycle block protect resources?

11

Running Advanced Terraform Commands

How do you bring existing infrastructure under Terraform?

12

Running Terraform in CI/CD and Teams

What does a safe team workflow look like? In a team, nobody runs terraform apply against production from a laptop.

13

Building Terraform Projects Hands-On

What will you build in these labs? Two labs take you from free and local to real cloud.

14

Troubleshooting Terraform with a Quick Reference

How do you fix the most common Terraform errors?

Career Impact

Roles that use the skills in this module.

  • Infrastructure Engineer

    ₹7L - ₹16L a year

    Very High
  • DevOps Engineer

    ₹8L - ₹18L a year

    High Demand
  • Systems Automation Engineer

    ₹8L - ₹17L a year

    High Demand
See how this is asked in interviews

Practice on the Coding Sheet

Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.

Open the Coding Sheet

Frequently Asked Questions

The basics are approachable: you describe resources in readable HCL files and run init, plan and apply. Most people are productive within a few days. The deeper skills, such as state management, modules and safe team workflows, come with practice on real projects.

No. You can learn the full workflow for free with the local, random and Docker providers on your own machine. An AWS free-tier account helps once you want to practise real cloud resources, as long as you run terraform destroy after every session.

Terraform creates and manages infrastructure such as networks, servers and databases, and remembers what it built in a state file. Ansible configures software on machines that already exist, such as installing packages and editing config files. Many teams use Terraform to build servers and Ansible to configure them.

Yes, the Terraform CLI is free to use for your own infrastructure. In 2023 HashiCorp moved it to the Business Source License, which mainly restricts building competing commercial products. OpenTofu is a fully open-source fork with nearly identical syntax if your company prefers that.