KilnVM Live Labs /lab/terramate-stack-codegen
Step 1 of 3 Docs Claim This Sandbox
Unclaimed Preview Sandbox · Hosted by KilnVM (15-run evaluation cap). Maintain this tool? Claim & embed on your docs →

Stack Change Detection and Codegen with Terramate

Detect changed Terraform stacks from a local Git branch with Terramate, fix a broken HCL codegen template, and generate stack files.

Step 1 of 3

Detect changed stacks and reproduce codegen failure

/workspace is on branch feat/app-update, where stacks/app changed relative to main. However, codegen.tm.hcl references an undefined global.missing_state_dir variable.

Run Terramate change detection and codegen diagnostics:

bash
terramate list --changed -B main > changed.txt && (terramate generate > gen-err.txt 2>&1 || true); cat changed.txt gen-err.txt