{ } HCL Playground
← Playground

What is this?

A browser playground for evaluating HCL expressions with Terraform or OpenTofu — no install, no project scaffolding, no init/console loop.

Why

You just want to know how setproduct() behaves, or test a gnarly for expression. Normally that means: install Terraform, make a project, write HCL, terraform init, terraform console, fix a typo, Ctrl+C, edit, repeat. This skips all of it — type an expression, hit Run.

How it works

Your input is split: locals { } blocks become a tiny main.tf, and the bare expression is piped to <engine> console in a throwaway directory that's created, evaluated, and deleted per request. Autocomplete and hover docs come straight from the selected binary's own metadata functions, so they're exact for whatever engine + version you've picked.

Engines & versions

Toggle between Terraform and OpenTofu; a range of versions is baked in, and you can install any other version on demand from the version menu — pulled from official, checksum-verified sources and cached.

Security

Run it yourself

git clone https://github.com/scottx611x/hcl-playground
cd hcl-playground
make run        # → http://localhost:8080

Built by Scott Ouellette. Source on GitHub.