LearnDevOpsHands-On Labs
Back to Playgrounds

🌍 Terraform IaC Simulator

Not Initialized
terraform-runner
Quick Run:
Terraform In-Browser IaC Simulator v1.8.2
Working directory: /home/devops/infra (main.tf, outputs.tf)
Run 'terraform init' to begin.
devops@iac-box:~/infra$
Configuration Files
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
}

provider "aws" {
  region = "us-east-1"
}

resource "aws_vpc" "main" {
  cidr_block = "10.0.0.0/16"
  tags = {
    Name = "devops-vpc"
  }
}

resource "aws_subnet" "public" {
  vpc_id     = aws_vpc.main.id
  cidr_block = "10.0.1.0/24"
}

resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t3.micro"
  subnet_id     = aws_subnet.public.id

  tags = {
    Name = "production-web"
  }
}
terraform.tfstate
0 resources
State is empty. Execute terraform apply to provision.
IaC Objectives
Task 1: Initialize Provider Plugins

Run 'terraform init' to download simulated AWS provider plugins.

Task 2: Dry Run Execution Plan

Run 'terraform plan' to calculate the diff before applying changes.

Task 3: Apply Infrastructure

Provision the VPC and EC2 instances: 'terraform apply'.

Core Mental Model

The Three Ideas You Need First

A quick primer before you jump into advanced commands. Skim these concepts, then experiment in the terminal above.

01

What is Terraform?

Terraform is an Infrastructure as Code tool. Instead of clicking through a cloud console, you describe the infrastructure you want in configuration files, and Terraform creates, updates and deletes real resources to match. Repeatably and safely.

02

What is Infrastructure as Code?

IaC means managing servers, networks and services through version-controlled files rather than manual steps. You write HCL (HashiCorp Configuration Language), commit it to git, review changes in pull requests, and get consistent, reproducible environments every time.

03

What is this playground?

A safe, simulated Terraform environment that runs entirely in your browser. You write real HCL and type real terraform commands, seeing realistic output, but nothing is provisioned and nothing can break. Guided steps check your work and track progress automatically.

How the In-Browser Simulation Engine Works

Unlike platforms that provision heavy remote virtual machines with cold start delays and time limits, this playground runs a high-fidelity client-side state machine implemented in TypeScript. Commands execute instantly in your browser memory with full state persistence, realistic latency simulation, and mock image registries. It is 100% safe to run destructive commands like pruning or deleting volumes without affecting your local system.

Frequently Asked Questions

Is this Terraform playground free?+

Do I need to install Terraform to use it?+

Is this a real Terraform environment?+

Which Terraform commands can I practice?+

Is the Terraform playground good for complete beginners?+

How long does the lab take?+