Explain Terraform code
Paste Terraform and Vibe explains what it will build and change: each resource, variable and output, what plan and apply do, and why one changed value can destroy and rebuild a resource.
Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.
Vibe25 lines selected
Press Explain it for the sample, or paste your own code first.
What this Terraform sample shows
- providers and init
required_providerssays which plugins the code needs and pins their versions.terraform initdownloaded hashicorp/local v2.9.1 and hashicorp/random v3.9.1, printedsigned by HashiCorpfor each, and wrote .terraform.lock.hcl with those versions. Terraform's own message says to commit that lock file so laterterraform initruns pick the same versions.- resources and references
- Each
resourceblock is one thing Terraform manages.random_pet.name.idpoints at the name the first resource makes, so Terraform created random_pet first and the file second, and wrote out/staging.json with{"env":"staging","name":"immense-dassie"}. A typo,random_pet.nme.id, stoppedterraform validatewithReference to undeclared resource. - plan and apply
terraform planlists what would change and changes nothing:Plan: 2 to add, 0 to change, 0 to destroy.applydoes it, but asks first:Only 'yes' will be accepted to approve.Answering no printedApply cancelled.and created nothing, and-auto-approveskips the question. Run again with nothing changed, apply printedNo changes. Your infrastructure matches the configuration.- variables and outputs
envdefaults to staging, and-var env=productionchanges it for one run. Theoutputprintedapp_name = "immense-dassie"after the first apply, andterraform outputprints it again any time. Because the name'skeepersincludeenv, changing env made a new name, powerful-giraffe, instead of keeping the old one.
Good to know
- Run with Terraform 1.17.1 on Linux, downloaded from releases.hashicorp.com and checked against HashiCorp's signed checksums, in a new folder holding only main.tf, with no backend, so the state stayed in a local terraform.tfstate. No cloud account or credentials were used.
- When out/production.json was deleted by hand, the next plan noticed and planned to write it again:
local_file.config will be created,Plan: 1 to add.
Watch out: Changing one value can destroy things, not just edit them. With -var env=production, the plan said must be replaced for both resources and ended Plan: 2 to add, 0 to change, 2 to destroy. Apply deleted out/staging.json and replaced the name. Read the destroy count in every plan before you type yes. The state file also keeps a copy of what it wrote: terraform.tfstate held the JSON file's full content in plain text, so never commit it.
Explain Terraform code beside your editor
Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).
Install on Mac
curl -fsSL https://unvibe.site/install.sh | bashPaste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.
Or download the .dmg · Intel Mac build · SHA-256 checksums
Opening the .dmg the first time
- Open the .dmg and drag Unvibe to Applications.
- Open it once; macOS says it can't verify it. Click Done.

Real screen, macOS 15 - System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.

Real screen, macOS 15
The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open