Get access to the Terraform playground with one click
Welcome to the Terraform Playground!
HashiCorp Terraform 1.12 — the industry-standard Infrastructure as Code tool. Define, preview, and apply infrastructure changes with a declarative HCL workflow.
Tip: Use
tf as a short alias for terraform. The local filesystem provider works without any cloud credentials for learning.What’s Pre-installed
- Terraform 1.12 with
terraformand aliastf - Shell: bash with vim, nano, curl, wget, git, jq
Quick Start
terraform --version tf --version
Common Workflows
# Initialise and apply a local resource
mkdir myinfra && cd myinfra
cat > main.tf <<'EOF'
terraform {
required_providers {
local = { source = "hashicorp/local", version = "~> 2.5" }
}
}
resource "local_file" "hello" {
content = "Hello from Terraform!"
filename = "/tmp/hello.txt"
}
EOF
tf init # download providers
tf plan # preview changes
tf apply -auto-approve
cat /tmp/hello.txt
tf destroy -auto-approveAdvanced Tips
# Variables and outputs
cat > variables.tf <<'EOF'
variable "message" { default = "world" }
EOF
cat > outputs.tf <<'EOF'
output "greeting" { value = "Hello, ${var.message}!" }
EOF
tf apply -auto-approve
tf output greeting
# State management
tf state list
tf state show local_file.hello
tf show
# Workspace
tf workspace new staging
tf workspace listSession Notes
- Session lasts 1 hour.
- No cloud credentials needed — use the
localprovider to practice core Terraform concepts.