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.

        Opening Terraform
        Your turn

        Terraform cheat sheet: plan, apply and state

        The command sequence

        Command Purpose Boundary
        terraform init Initialize the directory and selected backend and providers Initialization is not a deployment
        terraform fmt Format configuration Formatting does not validate provider behavior
        terraform validate Check configuration consistency It does not compare live infrastructure
        terraform plan Preview proposed changes It does not create or update objects
        terraform plan -out=review.tfplan Save a plan for review and later application Treat the file as sensitive; it can contain cleartext values
        terraform apply review.tfplan Apply the saved plan Recheck its scope, state and approval before applying
        terraform state list List managed resource addresses An address is not an availability check

        A replacement review

        Suppose a fictional service changes its region. The provider can require replacing the instance instead of updating it. Inspect the plan action and the changed attributes. A successful validate cannot tell you whether replacing that service will interrupt users.

        The official plan reference explains normal and refresh-only planning. In this browser course, the simulated provider has a stated schema; real providers decide which arguments force replacement. Practice resource changes and state inspection next.

        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.