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.
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
Curriculum Index14 topics
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...
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.
Writing HCL Blocks, Arguments and Expressions
What are blocks, arguments and attributes? HCL is built from three pieces.
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...
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.
Managing Terraform State Safely
What is state and why does Terraform need it?
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.
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...
Controlling Resource Lifecycles and Dependencies
How does the lifecycle block protect resources?
Running Advanced Terraform Commands
How do you bring existing infrastructure under Terraform?
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.
Building Terraform Projects Hands-On
What will you build in these labs? Two labs take you from free and local to real cloud.
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.
- Very High
Infrastructure Engineer
₹7L - ₹16L a year
- High Demand
DevOps Engineer
₹8L - ₹18L a year
- High Demand
Systems Automation Engineer
₹8L - ₹17L a year
Next Modules
Related Guides
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 SheetFrequently 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.