course.infrastructure_as_code

Stop clicking. Declare your infrastructure.

Learn to provision, version and promote cloud resources with Terraform — modules, remote state, separate environments, safe secrets and automated deployments. Self-paced, hands-on, from an empty folder to a delivery pipeline.

$ terraform plan course
+modules +remote state +pipelinesPlan: 7 modules to learn, 0 manual steps.
A long data-center aisle of server racks with fiber cables in perfectly ordered vertical runs
state.drift

Infrastructure drifts. Code doesn't.

Every manual change is a difference between what you think exists and what actually runs. Infrastructure as code removes the guesswork: the configuration is the source of truth, and the plan shows every difference before it happens.

Iron filings scattered on the left and aligned into clean field lines on the right
fig.01 / drift → desired state

By hand

  • ~Open the console, click through five screens.
  • ~Copy settings from staging by eye.
  • ~Paste a key into a config file "just for now".
  • ~Forget which checkbox fixed it last time.

Result: unknown. Reproducible: no.

main.tf declared
resource "aws_s3_bucket" "logs" {
  bucket = "app-logs-${var.env}"
  tags   = local.common_tags
}

# Same file. Every environment. Reviewed in Git.
output.capabilities

What you'll be able to do.

  1. + Provision networks, compute and databases from code instead of the console.
  2. + Write reusable modules with clear inputs, outputs and versioning.
  3. + Store state remotely, lock it safely and import what already exists.
  4. + Separate dev, staging and production without copy-pasting configuration.
  5. + Keep secrets out of code, state and logs.
  6. + Run plan and apply automatically from pull requests in CI.

Plan: 6 to add, 0 to change, 0 to destroy.

core.controls

Four controls that make infrastructure boring.

Writing a resource block is easy. Running real infrastructure from code depends on four things: reuse, a trustworthy record of state, clean separation between environments, and secrets that never leak.

A steel casting mold beside three identical concrete casts
1/4
module.reuse

Modules: write it once, use it everywhere.

Turn a working configuration into a module with typed inputs, useful outputs and a version tag. Then compose networks, services and databases from parts you trust instead of copying blocks between folders.

module.reuse.tf
module "network" {
  source  = "./modules/network"
  cidr    = "10.20.0.0/16"
  zones   = 3
}
A polished geological core sample showing many thin layers
2/4
backend.state

State: the record of what actually exists.

Understand what the state file holds and why it matters. Move it to a remote backend, enable locking so two applies never collide, and import, move or remove resources without recreating them.

backend.state.tf
terraform {
  backend "s3" {
    bucket = "ctc-tf-state"
    key    = "web/terraform.tfstate"
  }
}
Aerial view of three canal lock chambers at stepped water levels
fig.03 / dev → staging → prod
3/4
workspace.envs

Environments: same shape, different settings.

Promote one configuration through dev, staging and production with separate state and per-environment variables, so the differences are small, explicit and reviewed.

workspace.envs.tf
# envs/prod.tfvars
instance_count = 3
instance_size  = "large"
  • dev small, cheap, disposable
  • staging production-shaped, short-lived
  • prod locked state, reviewed applies
A sealed box in a dark room with a single thin beam of light escaping

fig.04 / var.sensitive

4/4
var.sensitive

Secrets: nothing sensitive in the repository.

Mark sensitive values, read credentials from a secrets manager or the CI environment, and keep them out of plan output, state snapshots and commit history.

var.sensitive.tf
variable "db_password" {
  type      = string
  sensitive = true
}
See where each is taught
pipeline.delivery

From pull request to applied. No hands on the console.

The last module turns everything into a pipeline: every change is planned in CI, reviewed as a diff, and applied exactly as approved.

Long-exposure light trails merging through a rail junction into a single track
  1. 01

    commit

    Configuration changes land in Git as a pull request.

  2. 02

    plan

    CI runs fmt, validate and plan, and posts the diff.

  3. 03

    review

    A human reads the plan, not a guess about it.

  4. 04

    apply

    On merge, the exact reviewed plan is applied.

course.curriculum

Seven modules. One working system.

Each module ends with a hands-on lab, and each lab adds a piece to the same infrastructure — so by the end you have built the whole system, not seven separate demos.

7 modules · 28 lessons · 7 labs

    • +Why infrastructure as code
    • +Installing Terraform and configuring a provider
    • +Resources, data sources and dependencies
    • +The plan / apply / destroy lifecycle
    labhands-on

    Provision your first bucket and network from an empty folder.

    • +Input variables, types and validation
    • +Outputs and locals
    • +count, for_each and dynamic blocks
    • +Functions and conditional expressions
    labhands-on

    Parameterise a web server stack without duplicating a single block.

    • +Module structure and interfaces
    • +Composing root and child modules
    • +Versioning and sourcing modules
    • +Designing modules other people can use
    labhands-on

    Extract a reusable network module and consume it twice.

    • +What lives in state and why
    • +Remote backends and state locking
    • +Importing existing resources
    • +Moving, renaming and removing resources safely
    labhands-on

    Migrate local state to a locked remote backend and import a hand-made resource.

    • +Directory layouts vs. workspaces
    • +Per-environment variables and backends
    • +Promoting changes from dev to production
    • +Detecting and fixing drift
    labhands-on

    Run one configuration as dev, staging and production.

    • +Sensitive variables and outputs
    • +Reading from a secrets manager
    • +Protecting state that contains secrets
    • +Least-privilege credentials for Terraform
    labhands-on

    Wire a database password end to end without it ever touching Git.

    • +Formatting, validation and linting
    • +Plan on pull request, apply on merge
    • +Saved plans and approvals
    • +Policy checks and safe rollbacks
    labhands-on

    Build a pipeline that plans every pull request and applies on merge.

course.projects

Three things you will build.

Course projects pull the modules together into infrastructure you could run. The plan excerpts below are examples of the output you will produce.

project.network_module example

project 01

A reusable network module

A VPC with public and private subnets across zones, packaged as a versioned module with documented inputs and outputs.

+ module.network.aws_vpc.main+ module.network.aws_subnet.private[0..2]+ module.network.aws_subnet.public[0..2]Plan: 9 to add, 0 to change, 0 to destroy.
project.web_stack example

project 02

A three-environment web stack

Load balancer, compute and a managed database, deployed to dev, staging and production with remote, locked state.

~ aws_autoscaling_group.web    desired_capacity: 2 → 3+ aws_db_instance.mainPlan: 1 to add, 1 to change, 0 to destroy.
project.delivery_pipeline example

project 03

A delivery pipeline

CI that formats, validates and plans every pull request, posts the plan for review, and applies the saved plan on merge.

terraform fmt -check   ✓terraform validate     ✓terraform plan -out=tfplanNo changes. Your infrastructure matches the configuration.
var.audience

Is this course for you?

For you if

  • +You create cloud resources in a web console and hope to remember how.
  • +You inherited infrastructure nobody can reproduce.
  • +You write application code and want to own your own infrastructure.
  • +You use Terraform already but avoid modules, remote state or CI.

Not for you if

  • −You have never used a command line or Git.
  • −You need a provider-specific certification exam course.

What you need

  • A cloud provider account (labs use AWS; patterns transfer)
  • The Terraform CLI
  • Git and a free repository host
  • A code editor

Self-paced lessons and written labs. No schedules or live sessions — access is granted after payment.

var.plan

Choose your plan.

One-time payment. Self-paced access is granted right after payment, and you can upgrade between plans later.

plan.plan

Plan

The fundamentals, end to end.

$129 one-time

  • +Modules 01–04
  • +Foundations, language, modules and state
  • +Hands-on labs for every module
  • +Self-paced lessons
Get Started

plan.apply_pipelines

Apply + Pipelines

Everything, plus production templates.

$349 one-time

  • +Everything in Apply
  • +CI template pack for plan / apply
  • +Extended reference configurations
  • +Module design checklists
Get Started
docs.faq

Questions, answered.

You should be comfortable with a terminal, Git basics and the general idea of cloud resources such as servers and networks. No prior Terraform experience is required.

Labs are written against AWS because it is the most common target. The concepts — modules, state, environments, secrets and pipelines — work the same way with other providers, and lessons point out where things differ.

The course uses Terraform. OpenTofu is a compatible fork, and almost everything you learn applies to it unchanged.

Labs are designed around small, short-lived resources, and every lab ends with a destroy step. Your provider may still charge for usage, so check its pricing and clean up after each session.

Access is granted right after payment. You sign in with the email you used at checkout and can start with module 01 immediately.

There are no cohorts, schedules or live sessions. Lessons and labs are self-contained, so you can move through them at whatever speed fits your work.

View Plans

Still unsure? Ask us directly.

No changes. Your infrastructure matches the configuration.

Make that your default.

Seven modules, three projects and a pipeline you can reuse at work. Start whenever you are ready.