Interactive roadmap

    Terraform roadmap

    This roadmap is for beginners wanting to build cloud infrastructure using code. You will learn to provision and manage servers and networks reliably.

    Your progress0% · 0 of 18 topics
    Done Learning Skipped OptionalClick any topic to learn more and mark your progress.
    1. 1

      Infrastructure as Code Basics

      0 of 3 done

      Understand what infrastructure as code means and install your tools.

      Take your time setting up your tools properly today, as a smooth environment makes learning the fun stuff much easier.
    2. 2

      Learning HCL Syntax

      0 of 3 done

      Master the configuration language used to write Terraform files.

      Do not worry about memorising every single rule right away; HashiCorp Configuration Language is designed to be read like plain English.
    3. 3

      Managing State

      0 of 3 done

      Discover how Terraform keeps track of what you have built.

      Treat your state files with great care, as they hold the secret mapping between your code and your live systems.
    4. 4

      Variables and Outputs

      0 of 3 done

      Make your code flexible and reusable across different environments.

      Use descriptive names for your input variables so your teammates can easily understand what values are required.
    5. 5

      Organising with Modules

      0 of 3 done

      Group related resources together into reusable packages.

      Think of modules as building Lego bricks; design them to snap together cleanly with well-defined entry and exit points.
    6. 6

      Workflows and Testing

      0 of 3 done

      Run safe updates and automate your deployments using pipelines.

      Always read your execution plans carefully before applying changes; a moment of caution saves hours of troubleshooting.

    Learn it all, with a tutor that never sleeps

    Every topic links to LevelUp lessons, practice exercises and the 24/7 AI Tutor. Your progress updates as you master lessons.

    Every topic explained

    Step 1: Infrastructure as Code Basics

    Learn how writing code replaces clicking around in a cloud dashboard, making setup repeatable and reliable.
    Read more

    Infrastructure as Code, often called IaC, is the practice of managing and provisioning computing resources through machine-readable definition files rather than physical hardware configuration or interactive configuration tools. Instead of clicking through a web dashboard to set up a server, you write plain text files describing what you want.

    Imagine you run a bakery and need to set up ten display counters. Clicking around a dashboard is like manually building each counter every morning. Writing IaC is like having a precise carpentry blueprint that builds identical counters automatically whenever you need them. If a counter breaks, you just run the blueprint again.

    This matters for your roadmap because it forms the bedrock of modern cloud engineering. It stops human error from creeping into your setups and ensures you can recreate your entire system in minutes if something goes wrong.

    • Replaces manual dashboard clicking with text configuration files
    • Makes infrastructure setups repeatable and reliable
    • Prevents human error during server creation
    • Allows full system recovery in minutes
    Terraform Documentation (HashiCorp)
    Get the command line tool installed on your computer so you can run infrastructure commands.
    Read more

    The command line interface is your primary tool for interacting with infrastructure tools. Installing the Terraform CLI puts a small program on your computer that reads your configuration files and talks to cloud providers on your behalf.

    Think of the CLI as a translator standing between you and a massive warehouse of cloud computers. You speak its language by typing commands into your terminal, and it runs around the warehouse doing the heavy lifting.

    Getting this installed locally is essential because all your testing, planning, and building will happen through these terminal commands. It bridges the gap between your local text editor and the live cloud servers.

    • Acts as the bridge between your computer and the cloud
    • Operates entirely through text commands in your terminal
    • Reads your code files to execute cloud changes
    • Essential for running local tests and builds
    (optional)
    Configure a code editor like VS Code with helpful plugins for writing configuration files.
    Read more

    A code editor is where you will spend most of your time writing infrastructure configuration. Setting up tools like Visual Studio Code with specific plugins gives you autocomplete, error highlighting, and formatting features.

    Imagine trying to write a letter in the dark without spellcheck. A properly configured editor turns on the lights and highlights spelling mistakes before you even finish typing your sentences.

    This matters because clean code saves you hours of frustration. Good plugins catch syntax typos instantly, stopping you from running broken configurations against your cloud provider.

    • Provides syntax highlighting to make code easier to read
    • Catches spelling and formatting typos automatically
    • Speeds up typing with smart autocomplete suggestions
    • Reduces debugging time significantly

    Step 2: Learning HCL Syntax

    Learn the basic building blocks of configuration files, including how to define settings using key-value pairs.
    Read more

    HashiCorp Configuration Language uses blocks and arguments to structure your setup instructions. A block is a container for configuration, defined by a type and labels, while arguments inside the block assign values to specific settings using equals signs.

    Think of a block as a recipe card, where the recipe type is cake, and the arguments are ingredient quantities like flour equals two cups and sugar equals one cup. Everything has a clear, labelled home.

    Learning this syntax is crucial because every single configuration file you write from now on will use these exact structural rules to organise your cloud resources.

    • Blocks act as containers for your configuration settings
    • Arguments assign values using simple key-value pairs
    • Uses equals signs to link settings to their values
    • Forms the core grammar of your configuration files
    Tell Terraform which cloud platform like AWS or Azure you want to connect to and control.
    Read more

    Providers are plugins that allow tools to interact with different cloud platforms, software systems, or service APIs. By configuring a provider, you tell your local tool which remote system it needs to talk to, such as Amazon Web Services or Google Cloud.

    Consider planning a holiday abroad. Your travel agent is the provider, taking your requests and talking to foreign airlines and hotels on your behalf to book your stay.

    This step matters because your local code cannot talk to cloud platforms directly without a translator plugin. Setting up providers ensures your commands reach the correct cloud destination securely.

    • Act as translation plugins for different cloud platforms
    • Connect your local configuration to remote APIs
    • Tell the tool which platform to build resources on
    • Handle authentication details for cloud access
    Write code to create a simple cloud resource, such as a virtual network or storage bucket.
    Read more

    Resources are the most important building blocks in your configuration, representing actual pieces of infrastructure like virtual servers, security groups, or storage buckets. You define them by giving them a resource type, a local name, and specific property arguments.

    Imagine ordering flat-pack furniture online. The resource is the bookshelf, and the arguments specify its height, colour, and number of wooden shelves.

    Mastering resource definition is the whole point of this roadmap. It allows you to translate real-world architectural needs into exact lines of executable code.

    • Represent real infrastructure items like servers or storage
    • Require a resource type and a custom local name
    • Include specific arguments to configure physical traits
    • Translate architecture plans into actual cloud assets

    Step 3: Managing State

    Understand the JSON file Terraform uses to map your real-world infrastructure to your configuration code.
    Read more

    The state file is a JSON document that records everything your configuration has built in the real world. It maps your code definitions to actual cloud resource IDs so the tool knows what exists, what has changed, and what needs deleting.

    Think of it as a rolling inventory sheet in a warehouse. When a new box arrives or an old box leaves, the inventory worker updates the clipboard sheet so everyone knows current stock levels.

    Understanding this file is vital because editing it manually can break your infrastructure. It is the single source of truth for your cloud environment's current health.

    • Stored as a JSON document tracking live resources
    • Maps configuration code to real-world cloud object IDs
    • Acts as the single source of truth for deployments
    • Tracks changes between different execution runs
    Store your state securely in the cloud so teams can work together without overwriting changes.
    Read more

    A remote backend moves your state file off your local laptop and into a secure cloud storage bucket. Instead of saving progress locally where only you can see it, the team shares a single centralised storage location.

    Imagine working on a shared spreadsheet saved on a company server instead of emailing separate Excel files back and forth to your colleagues.

    This matters immensely for teamwork. Without remote backends, two people could run commands at the same time using different local state files, causing total chaos in your cloud environment.

    • Moves state files from local laptops to cloud storage
    • Enables safe collaboration across engineering teams
    • Centralises infrastructure history in one secure place
    • Prevents individual computer failures from losing data
    (optional)
    Prevent two people from running updates at the exact same time and breaking the infrastructure.
    Read more

    State locking is a safety mechanism that puts a temporary padlock on your state file whenever someone starts a deployment run. If another person tries to run a command while the lock is active, the tool pauses them until the first run finishes.

    Think of a public restroom with an engaged lock on the door. Only one person enters at a time, preventing awkward collisions and ensuring privacy inside.

    Implementing state locking protects your infrastructure from corruption. Without it, simultaneous updates could write conflicting changes to your cloud resources at the exact same moment.

    • Prevents simultaneous runs from corrupting infrastructure
    • Puts a temporary lock on state during updates
    • Queues other users until the active run finishes
    • Protects against conflicting changes and data loss

    Step 4: Variables and Outputs

    Create configurable parameters so you can reuse the same code for staging and production.
    Read more

    Input variables allow you to parameterise your configuration files, turning rigid code into flexible templates. Instead of hardcoding values like server sizes or environment names, you define variables and pass different values in for staging or production.

    Think of a baking tray with interchangeable silicone moulds. You use the exact same metal tray framework every time, but swap the inner moulds depending on whether you want muffins or mini loaves.

    Variables are crucial for writing dry, reusable code. They let you deploy identical application architectures across multiple environments without duplicating your files.

    • Turn rigid configuration files into flexible templates
    • Prevent hardcoding values directly into resource blocks
    • Allow different values for staging and production
    • Promote clean, reusable code practices
    Extract useful information like IP addresses after your infrastructure finishes building.
    Read more

    Output values let you extract specific data from your finished infrastructure, such as public IP addresses, database URLs, or security tokens. Once your resources are built, these outputs print useful details directly to your terminal screen.

    Imagine ordering custom furniture and having the delivery driver hand you a card with the exact room measurements and weight limits once assembly is finished.

    Outputs matter because you often need data generated by your cloud provider to configure other applications or share details with your team without digging through cloud dashboards.

    • Extracts useful data after infrastructure finishes building
    • Prints connection details like IP addresses to screen
    • Makes resource attributes easily accessible to users
    • Connects infrastructure setup to application deployment
    (optional)
    Simplify complex expressions by assigning temporary names to repeated calculations or strings.
    Read more

    Local values give you a way to assign temporary names to complex expressions, repeated calculations, or concatenated strings inside your code. They help clean up messy formulas by letting you compute a value once and reference it multiple times.

    Think of a chef prepping ingredients into small glass bowls before cooking. Instead of chopping onions during the chaotic frying stage, everything is pre-measured and labelled for quick use.

    Using local values keeps your configuration readable and maintainable. They prevent you from repeating long string manipulations across dozens of different resource blocks.

    • Assign temporary names to complex expressions
    • Compute repeated calculations or string joins once
    • Keep configuration files tidy and readable
    • Reduce copy-paste errors in resource blocks

    Step 5: Organising with Modules

    Learn how modules help you bundle multiple resources into a single, easy-to-use template.
    Read more

    A module is a container for multiple resources that are used together, bundled into a single reusable package. Instead of writing fifty lines of code every time you need a standard web server setup, you wrap it in a module and call it with just a few lines.

    Think of buying a pre-assembled desktop computer bundle. Instead of buying the motherboard, graphics card, and memory sticks separately and wiring them yourself, you buy the whole tower unit ready to plug in.

    Modules are essential for scaling your infrastructure code. They help large teams standardise their setups and avoid repeating the same configuration patterns across different projects.

    • Bundles multiple related resources into single packages
    • Turns long configuration setups into short reusable calls
    • Standardises infrastructure patterns across teams
    • Keeps large projects tidy and manageable
    Pass data in and out of modules just like functions in traditional programming languages.
    Read more

    Module inputs and outputs act as the entry and exit gates for your bundled packages. You pass data into a module using input variables, and you pull generated results back out using module output references.

    Think of a washing machine. You put dirty clothes and detergent in through the front door as inputs, and you take clean clothes and drained water out as outputs.

    Mastering module interfaces lets you build modular, self-contained infrastructure components that behave like proper software functions, making your codebase clean and easy to test.

    • Pass data into modules using custom input variables
    • Extract results out using module output references
    • Act like function parameters in traditional programming
    • Ensure clear boundaries between different code components
    (optional)
    Browse and use pre-made modules created by the community for common infrastructure setups.
    Read more

    The public registry is an online library filled with pre-made, community-tested modules for common cloud architectures like virtual private clouds or database clusters. Instead of writing every standard component from scratch, you can download verified setups.

    Think of an open-source recipe website where home cooks share tried-and-tested pastry instructions so you do not have to invent pastry dough from scratch.

    Using the public registry saves you immense amounts of time and exposes you to industry best practices designed by experienced cloud architects.

    • Provides an online library of pre-made modules
    • Saves time on writing common infrastructure setups
    • Includes community-tested and verified code patterns
    • Helps beginners learn professional architectural layouts

    Step 6: Workflows and Testing

    Preview your changes with plan before applying them to make sure nothing unexpected happens.
    Read more

    The plan and apply workflow is the core safety loop of infrastructure management. Running a plan command generates a detailed preview of what resources will be added, changed, or destroyed, while the apply command executes those changes in the cloud.

    Think of an architect showing a client a 3D digital walkthrough of a proposed house extension before picking up a hammer to start building walls.

    This workflow is vital because it prevents accidental disasters. Seeing a clear preview stops you from blindly running code that might accidentally delete an important production database.

    • Generates a detailed preview of changes before execution
    • Shows clearly what will be added, modified, or deleted
    • Applies approved changes safely to cloud providers
    • Acts as the primary safety check for deployments
    Automate your infrastructure updates using continuous integration tools like GitHub Actions.
    Read more

    Continuous integration and continuous deployment pipelines automate your infrastructure workflows using remote servers. Instead of running deployment commands from your own laptop, automated tools run your plans and applies whenever code gets pushed to your repository.

    Think of an automated car wash system. You drive your car onto the belt, and automated machinery washes, rinses, and dries it without needing human hand guidance.

    Pipelines are essential for professional engineering teams. They ensure infrastructure updates follow strict review processes and remove the risk of manual human error during deployment.

    • Automates infrastructure updates using remote servers
    • Triggers plan checks automatically on code updates
    • Removes the need for manual laptop deployments
    • Enforces consistent team review workflows
    (optional)
    Write automated tests to check your infrastructure code before deploying it to the cloud.
    Read more

    Configuration testing involves running automated checks against your code to validate security rules, formatting standards, and structural logic before deploying it to live environments. It acts as an early warning system for mistakes.

    Think of a quality control inspector testing electrical appliances in a factory before packing them into boxes for shop shelves.

    Testing matters because catching a security misconfiguration in code is infinitely cheaper and safer than fixing a breached server running in the live cloud.

    Key points:

    • Runs automated checks on code before cloud deployment
    • Validates security rules and structural logic early
    • Catches configuration errors in a safe local state
    • Saves time and prevents costly live environment fixes

    Related roadmaps