Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Courses / Cloud

        Terraform tutorial with hands-on exercises

        Learn Terraform by editing HCL, reading a plan and checking the resulting infrastructure state. This browser course uses an independent simulated provider, so you can practice without a cloud account. Start with resources and variables, then work through modules, state recovery and release controls.

        Start lesson 1Practice interviewTake the assessmentPractice the first unit of every course. No account needed.
        70lessons
        377checked exercises
        10projects, cases and exams
        Prepares you for Terraform Associate 004 objectives and cloud engineering interviews

        What you will be able to do

        • Read create, update, replace and destroy actions before applying a plan
        • Build reusable modules with explicit inputs and outputs
        • Import existing objects and preserve resource identity during a refactor
        • Explain state locking, drift, sensitive values and a reviewed release

        Who it is for

        You are learning infrastructure as code
        Start with one resource and see how configuration, state and the provider differ.
        You work in cloud or platform engineering
        Practice a refactor or recovery, then explain its boundaries in an interview.

        What you can practice free

        Unit 1, Terraform workflow: 5 lessons and 24 checked exercises, with no account or card.

        Start the free unit

        The rest of the course opens with a One Course or All Access plan. See plans and prices

        Keep going in Terraform

        Choose access here. Your course is already selected.

        One Course

        Every lesson, project and mock exam in Terraform.

        Loading price/ month

        Billed monthly. Cancel any time.

        All Access

        Every course, exam and project, plus the Interview Hub.

        Loading price/ month

        Billed monthly. Cancel any time.

        Projects, case studies and mock exams

        Practice Terraform from the first resource block through modules, state adoption, safe changes and team operations. Write HCL files and run a Terraform-style terminal against an original local provider. Inspect semantic plan diffs and managed resource state, use variables and expressions, build repeated infrastructure and pass outputs across module boundaries. Later levels cover drift, imports, moved blocks, validation, tests, sensitive values and HCP Terraform concepts. Projects carry your work between steps. Checked interviews and two shorter original Associate 004-style practice mocks test your decisions. The bounded browser simulation does not run Terraform itself or connect to a cloud account, HCP Terraform or a paid service.

        Beginner

        FreeNo account or card needed. Every lesson in this unit is yours to practice.

        Terraform workflow

        Describe a desired service and let a plan reconcile it.

        5 lessons

        Inputs and outputs

        Parameterize a resource without changing its address.

        5 lessons

        Expressions

        Name a repeated expression inside a module.

        5 lessons

        Intermediate

        Repeated infrastructure

        Create indexed instances and inspect the zero-based address.

        5 lessons

        Module design

        Pass a root value through a local module boundary.

        6 lessons

        State and environments

        Inspect the binding between an address and an existing object.

        6 lessons

        Advanced

        Change safety

        Identify a replacement before changing an immutable property.

        5 lessons

        Refactoring and adoption

        Bind an existing object without recreating it.

        6 lessons

        Team operations

        Choose state storage and review migrations separately from resources.

        6 lessons

        Expert

        Testing and policy

        Test a planned contract instead of checking a copied literal.

        5 lessons

        HCP and transient values

        Separate hosted configuration, state and access by responsibility.

        6 lessons

        Recovery and assessment

        Use the failing stage and state evidence to choose the next action.

        10 lessons

        Configuration, state and the provider

        These are three different records. Configuration describes your intended resources. State maps resource addresses to managed objects. The provider reports what exists. A change outside Terraform can make the three disagree, so a green syntax check is only the beginning.

        Read the command reference before applying a change. A plan previews actions. It does not carry them out. Check a replacement just as carefully as a deletion: an address that stays the same can still refer to a newly created object after the operation.

        Modules and existing infrastructure

        A module lets you reuse a resource design through a defined interface. Work through module inputs and outputs, then check how the calling configuration uses that interface. Pinning a provider and pinning a module are separate decisions.

        Use the import exercises to bring an existing fictional object under management. Import establishes a state binding. It doesn’t prove the configuration matches that object. Review the next plan before an apply.

        Interview and certification practice

        The Terraform interview questions use separate scenarios with a working task and follow-up questions. Explain what the state proves, what the provider proves and which evidence would stop a release.

        The course’s certification practice follows the Associate 004 content list, which tests Terraform 1.12. Hosted collaboration, real provider behavior and organizational permission controls require separate hands-on study outside this browser model.

        Common questions

        Does this run the Terraform executable?

        The editor and terminal use our own teaching model. They implement a documented subset of Terraform 1.12 behavior with a fictional provider. They do not install Terraform or contact a cloud account.

        Does this prepare me for Terraform Associate 004?

        The course maps its subjects to the official objectives. Its original practice exams are shorter than the official sitting. The certification practice guide explains the scope; this is independent practice, not a HashiCorp credential.

        Can I practice Terraform for free?

        The course page shows the available lessons. The pricing page shows every plan.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.