Clicking through a cloud console works until you need to rebuild an environment, review a change or explain why a server exists. Infrastructure as code puts your networks, servers, databases and DNS records in version-controlled files that can be reviewed, tested and applied the same way every time. Terraform is the most widely used tool for this, and its open-source fork OpenTofu uses the same language. This course teaches both the syntax and the habits that keep infrastructure changes safe.

What you'll learn

  • What infrastructure as code solves and how Terraform compares with other tools
  • HCL basics: providers, resources, data sources, variables and outputs
  • The plan and apply cycle, and how to read a plan before you approve it
  • How Terraform state works, why it matters and how to store it remotely with locking
  • Writing reusable modules and using well-maintained public ones
  • Managing multiple environments such as development, staging and production
  • Handling secrets without writing them into code or state carelessly
  • Importing existing resources and refactoring with moved and import blocks
  • Running Terraform in CI with plan reviews on pull requests
  • Detecting drift, testing modules and policy checks

Who it's for

  • Developers and DevOps engineers who manage cloud resources by hand today
  • Teams that want infrastructure changes reviewed like application code
  • Agencies running similar setups for several clients

Prerequisites

  • Basic familiarity with at least one cloud provider (see AWS Cloud Foundations)
  • Comfortable with Git and the command line
  • A cloud account where you can create and delete small resources; labs are designed to be cleaned up after each module

Outcomes

By the end of this course you will be able to:

  1. Describe a complete web application environment in Terraform.
  2. Manage state safely for a team using a remote backend with locking.
  3. Build reusable modules and promote changes across environments.
  4. Review and apply infrastructure changes through a CI pipeline.
  5. Bring existing hand-built resources under Terraform management.

Course outline

ModuleTopic
1Infrastructure as code concepts
2Terraform and OpenTofu setup, providers and first resources
3Variables, outputs, locals and expressions
4Plan, apply, destroy and reading diffs
5State, remote backends and locking
6Modules: writing and consuming them
7Environments and workspace strategies
8Secrets and sensitive values
9Importing and refactoring existing infrastructure
10Terraform in CI and pull request reviews
11Testing, drift detection and policy
12Project: a production-style web stack as code

FAQ

Terraform or OpenTofu?

Both use the same configuration language and workflow. We explain the licensing background and the small differences so you can follow your team's choice.

Which cloud do the labs use?

The main labs use AWS because it is the most common target, with short examples for Google Cloud, Azure and DNS providers to show that the patterns carry over.

Will the labs cost money?

Most resources used fit within free tiers or cost very little if destroyed promptly. We show you how to set billing alerts first.

How do I join?

Get in touch and we'll share the current format, schedule and enrolment details.