Course 7 of 8 on the DevOps Engineer path

Infrastructure as Code with Terraform

Describe cloud infrastructure in code: providers and resources, variables and loops, state and remote backends with locking, modules, imports and refactoring, and a safe plan-review-apply workflow in teams and CI.

  • 8 lessons
  • About 86 min reading
  • Intermediate
  • Updated 13 Nov 2026

After this course you can

  • Explain declarative infrastructure as code and the Terraform workflow
  • Write configurations with providers, resources, variables, locals, outputs, count and for_each
  • Understand state, drift and why state needs remote, locked, versioned storage
  • Build reusable modules and use workspaces or separate states for environments
  • Import existing infrastructure, refactor with moved blocks, protect critical resources
  • Run Terraform safely in a team: review plans, test, and apply from CI

Before you start: the Git, Networking and Cloud platforms courses. You should know what a VPC, subnet, security group and object storage are.

Lessons

Know it, or think you know it?

Take a free mock interview on Infrastructure as Code with Terraform for DevOps Engineer: 3 questions, a score and feedback on each, in about 10 minutes.