OpenTofu with Google Cloud CLI Playground
A disposable OpenTofu development environment with the gcloud SDK, tofu, kubectl, and the GKE auth plugin pre-installed.
- eth0
- /
- oci://ghcr.io/omkar-shelke25/opentofu-gcloud-playground:sha-086f217
A disposable OpenTofu development environment with the gcloud SDK, OpenTofu CLI, kubectl, and the GKE auth plugin pre-installed. Full IDE support via VS Code. Runs on 4 vCPU / 10 GiB RAM / 100 GiB disk.
What's included
tofu: OpenTofu CLI 1.12.6gcloud/gsutil/bq: Google Cloud SDK 585.0.0kubectl: Kubernetes CLIgke-gcloud-auth-plugin: GKE cluster authk9s/kubectx/kubens: cluster UI and context switchinglazygit: Git in a terminal UIjq/yq: JSON and YAML processing- zsh with a Catppuccin starship prompt that shows the git branch, tofu workspace, GCP project and kube context, plus autosuggestions, syntax highlighting and atuin history search
Key commands
New project
mkdir my-infra && cd my-infra
tofu init
Plan and apply
tofu plan
tofu apply
tofu apply -auto-approve
Destroy
tofu destroy
tofu destroy -auto-approve
Format and validate
tofu fmt
tofu fmt -check
tofu validate
State management
tofu state list
tofu state show <resource>
tofu state rm <resource>
tofu import <resource> <id>
Workspaces
tofu workspace list
tofu workspace new dev
tofu workspace select dev
gcloud auth
gcloud auth login --no-launch-browser
gcloud auth application-default login --no-launch-browser
gcloud config set project PROJECT_ID
GKE access
gcloud container clusters get-credentials CLUSTER --location LOCATION
kubectl get nodes
Terminal shortcuts
k get pods # kubectl
tf plan # tofu
ll # detailed file listing
z my-infra # jump to a recent directory
lg # lazygit
icons on # Nerd Font icons, if your own terminal has the font
Ctrl+R searches history, Ctrl+T picks a file, Alt+C jumps into a subdirectory.
A real VM, not a container
Get root on a VM with its own kernel, so Docker, Kubernetes, and systemd just work.
Read the docs →
SSH from browser or CLI
Use the built-in web terminal, or connect with labctl ssh, plain ssh, scp, or rsync.
Read the docs →
Drive it with AI
Let Claude, Codex, or any MCP client start this playground and run commands in it.
Read the docs →
Expose HTTP(S) ports
Give any web app running inside the VM a public URL - for yourself or to share with others.
Read the docs →
Share terminals
Invite others into your terminal session, or open it yourself from another device.
Read the docs →
Customize with init scripts
Add shell scripts that run at boot to install packages, clone repos, or seed test data.
Read the docs →
Private networking
VMs reach the internet via NAT with no public IP; several VMs share bridge networks.
Read the docs →
Ephemeral or persistent
By default, VMs are destroyed when the session ends; enable persistence to keep the disks for next time.
Read the docs →
Built-in container registry
A private registry.iximiuz.com for every playground to share images across services and VMs.
Read the docs →