Courses / Data, AI & infrastructure / Terraform Fundamentals

₹99Self-paced

Terraform Fundamentals

Write modular, tested Terraform configuration and run a reviewed plan, drift drill and safe teardown on a zero-cost local lab.

  • Who it's for. Developers comfortable with Git and the command line who want to manage infrastructure as code safely.
  • Before you start. Comfortable with Git branching, commits and pull requests and with the cloud and infrastructure-as-code vocabulary from the earlier course (declarative vs imperative, environments, blast radius, teardown).
  • 30 to 50 hours of study with practice
  • 8 modules, 49 lessons
  • 4 guided projects and a final project

What you'll learn

  • Choose between Terraform and OpenTofu using the actual licence terms and write a short decision record.
  • Parameterise configuration with typed, validated variables, locals, for_each and outputs, and predict which value source wins.
  • Package configuration as a module with a clean interface, call it more than once, pin its source and test it with terraform test.
  • Detect drift, reconcile it with refresh-only plans, import existing objects and remove objects from management without destroying them.
  • Deliver a versioned lab with plan review, failure drills and a teardown proven by an empty residual listing.

Skills you'll gain

  • Providers
  • resources
  • Variables
  • outputs
  • State
  • locking
  • Modules
  • Plan
  • apply
  • Imports
  • drift
  • Secrets
  • policy
  • Infrastructure project

Tools you'll use

  • Terraform
  • terraform test
  • Git
  • JSON plan output

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 8 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 5 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 2

    Parameterised local config generator

    Choose the tool with the licence in view, set up a pinned workspace, declare resources and data sources, and read how Terraform orders and versions them, all on a zero-cost local lab.

    You build: Parameterised local config generator: Pinned workspace that writes three dependent files with local_file.

  2. 02

    Modules 3 to 4

    State-safe refactor into a module

    Explain what state records, inspect and relocate it, watch locking stop concurrent writers, recover from a stuck lock, refactor addresses without destroying objects, and treat state as sensitive data.

    You build: State-safe refactor into a module: Local backend with a recorded lock-conflict experiment and a state list before/after.

  3. 03

    Modules 5 to 6

    Drift and import drill

    Read a plan before approving it, apply exactly what was reviewed, use exit codes in automation, understand what forces replacement, and apply lifecycle rules and targeted or destroy plans with restraint.

    You build: Drift and import drill: Annotated saved plan that proves a replacement and its cause.

  4. 04

    Module 7

    Guardrailed configuration

    Keep secrets out of Git and, where Terraform allows it, out of state enforce guardrails with validation, preconditions, postconditions and check blocks and review plans against a written policy using the plan's JSON form.

    You build: Guardrailed configuration: Secret supplied by environment variable, shown to sit in state, and kept out of Git.

  5. 05

    Module 8

    Versioned infrastructure lab with plan review and safe teardown

    Deliver a versioned, modular, tested local infrastructure lab with a recorded plan review, rehearsed failures and a teardown proven by an empty residual listing.

    You build: The final project, demonstrated to a trainer.

Full curriculum

8 modules and 49 lessons, 30 to 50 hours of study

01Providers and resources6 lessons, 3 to 4 hours

Lessons

  • Terraform or OpenTofu: reading the licence before choosing
  • Anatomy of a Terraform workspace and what init creates
  • Declaring a managed resource and applying it
  • Implicit and explicit dependencies
  • Data sources: reading what Terraform does not manage
  • Constraining and locking provider versions

After this module you can

  • Write a one-page decision record that states each tool's licence, the version boundary, and the use case in which the licence would matter.
  • Create a workspace with a terraform block and required_providers, run terraform init, and list which files and directories init added.
  • Write a version constraint, read what the lock file recorded, and upgrade deliberately with init -upgrade.
02Variables and outputs6 lessons, 3 to 4 hours

Lessons

  • Typed input variables and defaults
  • Validation blocks with clear error messages
  • Which value wins: tfvars, auto.tfvars, environment and -var
  • Locals and expressions: conditionals and for expressions
  • for_each and count: repeated resources from collections
  • Outputs, sensitive outputs and reading them back

After this module you can

  • Declare string, number, bool and map variables with types and defaults, and reference them as var.name in a resource.
  • Add a validation block that rejects out-of-range or malformed values with a helpful message.
  • Define outputs, mark one sensitive, and read values with terraform output, -json and -raw.
03State and locking7 lessons, 3 to 5 hours

Lessons

  • What state records: bindings between addresses and real objects
  • The local backend: where state lives and what its backup is
  • Locking: watching a second writer get refused
  • Stuck locks and force-unlock
  • Renaming and moving addresses without destroying: state mv and moved blocks
  • State is sensitive: secrets inside and the rules for remote storage
  • Workspaces versus separate directories for environments

After this module you can

  • Inspect terraform.tfstate through terraform state list and state show and state what each entry binds.
  • Configure the local backend path explicitly and find terraform.tfstate and terraform.tfstate.backup after two applies.
  • Create two workspaces, show separate state per workspace, and decide when separate directories are the safer choice.
04Modules6 lessons, 3 to 4 hours

Lessons

  • Root and child modules: calling a local module
  • Designing a module interface: inputs, outputs and what to hide
  • Repeating a module with for_each
  • Module sources, versions and what init records
  • Extracting resources into a module with moved blocks
  • Testing modules with terraform test and mocked providers

After this module you can

  • Move a resource into ./modules/<name>, call it with a module block, and identify root versus child module in plan output.
  • Define a module with typed, documented variables and outputs so callers never reference its internal resources.
  • Write a .tftest.hcl file with command = plan runs, assert blocks and an expect_failures case for a module.
05Plan and apply6 lessons, 3 to 4 hours

Lessons

  • Reading a plan: symbols, forces replacement and the summary line
  • Saving a plan and applying exactly that plan
  • Plan exit codes for scripts: -detailed-exitcode
  • What forces replacement and how to trigger it deliberately
  • Lifecycle rules: prevent_destroy, create_before_destroy and ignore_changes
  • Targeted plans and destroy plans: restraint and rehearsal

After this module you can

  • Read a plan transcript and classify every resource as create, update in place, destroy, replace or read.
  • Create a plan file with -out, inspect it with terraform show, and apply it so that the applied changes match the reviewed ones.
  • Explain why -target is exceptional and rehearse a destroy with plan -destroy before running terraform destroy.
06Imports and drift6 lessons, 3 to 4 hours

Lessons

  • Three truths: configuration, state and the real object
  • Refresh-only plans: seeing and accepting drift without changing objects
  • Detecting drift on a schedule and deciding who is right
  • Import blocks: adopting an existing object into state
  • Generating configuration with -generate-config-out and cleaning it
  • Releasing an object from management without destroying it

After this module you can

  • Classify any difference as a configuration change, drift or an unmanaged object by comparing three sources.
  • Run plan -refresh-only to see drift and apply -refresh-only to record it in state without altering the real objects.
  • Remove a resource from state with terraform state rm and from configuration so the real object stays.
07Secrets and policy6 lessons, 3 to 4 hours

Lessons

  • What sensitive = true does and does not do
  • Secrets in state: inspecting and containing the exposure
  • Ephemeral values: keeping a value out of state
  • Supplying secrets: environment variables, ignored files and rotation
  • Guardrails in configuration: preconditions, postconditions and check blocks
  • Policy as a reviewed plan: checking plan JSON against written rules

After this module you can

  • Mark variables and outputs sensitive and list the places where the value is still visible.
  • Show a secret in state and apply containment steps: ignore state in Git, restrict access, prefer secret sources outside configuration.
  • Convert a plan to JSON and write a small script that fails the run when the plan violates a written rule.
08Infrastructure project6 lessons, 3 to 4 hours

Lessons

  • From brief to repository layout and a first tagged version
  • Composing modules with typed inputs and tests
  • Writing and recording a plan review
  • Failure drills: lock, drift and a bad variable
  • Teardown and the empty residual listing
  • Upgrade rehearsal, hand-over and demonstration

After this module you can

  • Turn a project brief into a repository layout with a README contract and tag v0.1.0 with a pinned provider and committed lock file.
  • Compose two local modules in the root, with validated inputs and a command = plan test for each.
  • Rehearse a provider upgrade through the lock file and prepare a hand-over README and demonstration script.

What you'll build

4 guided projects along the way, then a final project.

  • Parameterised local config generator

    after module 2
  • State-safe refactor into a module

    after module 4
  • Drift and import drill

    after module 6
  • Guardrailed configuration

    after module 7

Final project

Versioned infrastructure lab with plan review and safe teardown. Options: Local environment kit; Release manifest factory; Team workspace scaffold.

What you submit

Source submission: a Git repository with tagged versions (at least v0.1.0 and v0.2.0), pinned required_providers, committed .terraform.lock.hcl, no state, .terraform directory or secrets.

How it's reviewed

Trainer review against a weighted rubric: P l a n r e v i e w q u a l i t y 2 5 % ; c o r r e c t n e s s a n d i d e m p o t e n c e ( n o - c h a n g e s e c o n d p l a n ) 2 0 % ; s t a t e , l o c k i n g a n d d r i f t h a n d l i n g 2 0 % ; s e c r e t.

Where you'll use it

  • Read a Terraform plan and spot a change that forces replacement before approving it.
  • Bring an existing hand-made resource under management with an import block without recreating it.

Roles that use these skills

  • DevOps engineer
  • Infrastructure engineer
  • Platform engineer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

What should I know before starting?

The course expects Cloud Computing Fundamentals, Git, GitHub and Open Source Contribution or an accepted equivalent. Comfortable with Git branching, commits and pull requests. A short diagnostic check is described in the entry requirements.

What do I build for the final project?

You choose one of 3 options: Local environment kit; Release manifest factory; Team workspace scaffold. It is reviewed by a trainer in a live demonstration.

When do I get a certificate?

Only after you build and demonstrate your live project. OUTLEARN staff issue certificates; nothing is issued automatically.

Be first in when Terraform Fundamentals opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
₹99Opens soon
Notify me