CDK for Terraform lets you define infrastructure in a real programming language, but every new project starts with the same repetitive boilerplate: a main file, a dependency manifest, a cdktf.json, and a provider wiring block. The CDKTF Scaffold Generator bootstraps all of that for you in TypeScript, Python, Go, Java or C# so you can skip straight to writing infrastructure. You pick a language and a provider, name the project, and the tool emits the idiomatic entrypoint, the correct build file, the matching cdktf.json, and a small sample stack that configures a provider and creates one example resource plus a Terraform output. This is ideal when you are evaluating CDKTF, onboarding a team onto a new language, or simply tired of copying the same skeleton between repositories and risking subtle mistakes. The generator runs entirely in your browser and never executes CDKTF, so nothing is installed or run on your machine; you get plain text files you can drop into a fresh repository and run with your normal toolchain. Because the output is deterministic for a given set of inputs, you can regenerate the same scaffold repeatedly and trust that the structure is correct every time. Each language target uses the conventions the CDKTF documentation recommends, from the App bootstrap in TypeScript to the func main entrypoint in Go, so the result is a faithful starting point rather than a guess. The Java and C# targets follow the standard class based structure those ecosystems expect, which means the generated code compiles with the usual build tools and does not surprise you with unexpected layout choices.
Terraform CDK (CDKTF) Scaffold Generator
Bootstrap a CDK for Terraform project in your language of choice.
Your generated scaffold will appear here.
About Terraform CDK (CDKTF) Scaffold Generator
Features
- Five languages - TypeScript, Python, Go, Java and C# supported out of the box.
- Provider wiring - aws, azurerm or google configured in the stack with a region.
- Sample resource - an instance, resource group or compute instance per provider.
- cdktf.json - correct language and app command per target, ready to run.
- Dependency files - package.json, requirements.txt, go.mod, pom.xml or csproj as needed.
- Validation - project name and a supported language are required before any file is written.
- Output stats - shows file and line counts after every generation.
- Wrap toggle - wrap long generated lines for comfortable easy reading.
- Copy / Download / Print - export the scaffold wherever you need it.
- Private - generated locally, nothing uploaded or transmitted anywhere.
- Terraform output - a sample output wiring is included for immediate feedback.
- Provider pinned - cdktf.json pins the provider version for you automatically.
How to Use
- Pick a language and provider from the two dropdowns on the left.
- Name the project in the project name field using a simple identifier.
- Click Generate to build the scaffold files from the chosen options.
- Review the preview and resolve any validation messages in the alert panel.
- Read the stats row to confirm how many files and lines were produced.
- Use the Wrap button if the generated code is too wide to read on a small screen.
- Copy, download or print the scaffold and paste it into a new project directory.
- Run the dependency install for your language, then cdktf synth to verify the output builds.
Examples
Example - TypeScript with aws yields main.ts that declares an AwsProvider and an Instance, a package.json with the cdktf and constructs dependencies, and a cdktf.json whose app command compiles and runs main.js. Python produces main.py plus requirements.txt, Go produces main.go plus go.mod, and Java and C# produce their respective entrypoints and build files. The sample stack always configures a provider in us-east-1 and creates one example resource with a Terraform output, so the scaffold is immediately synth-able. In every case the stats row reports the file and line totals so you can sanity check the output before committing it to a repository. You can then replace the sample resource with your own infrastructure and extend the stack as the project grows.
Benefits
- Fast start - no manual boilerplate to remember or mistype under pressure.
- Correct imports - language specific and provider aware, every time.
- Portable - drop the files into any empty repo and start building immediately.
- Private - browser only, nothing executed on your machine or sent anywhere.
- Consistent - deterministic scaffold for every language you choose.
- Educational - a clean reference for CDKTF project layout and conventions across ecosystems.