All Tools View Categories About Contact Privacy

Terraform to Pulumi Converter

Convert pasted .tf resources into Pulumi code (TypeScript / Python / Go).

Runs entirely in your browser - nothing is uploaded and no cloud connection is made.
Your generated Pulumi code will appear here.
0
Lines
0
Words
0
Characters

About Terraform to Pulumi Converter

Migrating from Terraform to Pulumi is a common step when a team wants the full power of a general purpose language for infrastructure. The Terraform to Pulumi Converter takes the .tf you already wrote and turns each resource block into equivalent Pulumi code in TypeScript, Python or Go, mapping Terraform resource types to their Pulumi SDK equivalents and carrying your attributes into the constructors. It is a head start, not a complete rewrite, but it removes the most tedious translation work so you can focus on the interesting parts of the migration. Rather than retyping dozens of resource blocks by hand, you get a compilable first draft that already imports the right packages and wires up the right types.

The converter parses your configuration entirely in the browser with a real HCL parser, so nothing is uploaded and no external service is contacted. A built in type map covers the most common AWS, Azure, Google and Kubernetes resources, with a sensible fallback for anything it does not recognise. You can use the output as a skeleton, then refine it by hand: add outputs, wire up dependencies, and adopt Pulumi idioms such as configuration and StackReferences. Because the parse is real, the attribute names you set are preserved faithfully in the generated code, and the live stats panel tells you exactly how many resources were converted. The converter is also useful for comparing the two tools side by side before you commit to a larger refactor.

Features

  • Real HCL parse - reads resource blocks with a client side parser.
  • Three languages - emit TypeScript, Python or Go from one source.
  • Type map - common aws, azure, gcp and kubernetes types mapped.
  • Attribute carry over - your values pass into the constructors as typed arguments.
  • Fallback mapping - unknown types get a best effort Pulumi type following the provider dot class pattern.
  • Validation - clear errors on empty or unparseable input.
  • Imports generated - correct package imports per provider, including the pulumi core package.
  • Copy, download, print - export the generated code in three ways.
  • Live stats - see resource count, line and character totals.
  • Browser only - fully client side and private.
  • Sample loader - prefill a realistic example in one click.
  • Multi resource - convert every resource in the pasted file at once, in dependency order preserved from source.

How to Use

  1. Paste your .tf - include the resource blocks you want to migrate.
  2. Pick a language - TypeScript, Python or Go.
  3. Convert - review the generated code and the live stats panel.
  4. Read the imports - confirm the right Pulumi packages are referenced for each provider.
  5. Check the stats - confirm the resource count matches your source file.
  6. Export it - copy, download or print the code.
  7. Refine by hand - add outputs, variables and Pulumi style wiring before compiling.
  8. Compile - run the target language toolchain to verify the generated draft builds.

Examples

Single resource: resource "aws_instance" "web" becomes new aws.ec2.Instance("web", { ami: "ami-123", instanceType: "t2.micro" }) in TypeScript, with the ami and instance_type attributes carried across as ami and instanceType. Multi provider: a file with aws_instance and azurerm_resource_group yields both aws.ec2.Instance and azure.core.ResourceGroup, plus the correct import lines for @pulumi/aws and @pulumi/azure. Python and Go: the same input emits pulumi_aws style calls or pulumi.String wrapped Go constructors. Unknown type: a hypothetical myorg_widget maps to myorg.Widget so you can see the convention and adjust the namespace. Nested values: maps and lists in your .tf become plain object and array literals in the target language, preserving structure. The stats panel shows how many resources were converted and how large the output is, which helps you gauge the size of the migration before you commit any effort to it.

Benefits

  • Fast migration - HCL to Pulumi in seconds, not hours of manual typing.
  • Accurate - real parsing and a maintained type map keep attribute names intact.
  • Portable - works for any provider you paste, public or private.
  • Private - parses only in your browser, with no upload and no telemetry.
  • Multi language - one source, three target languages to fit your stack.
  • Educational - the stats panel and mapping make the translation obvious.
  • Repeatable - rerun the converter as your .tf evolves during a gradual move.

Frequently Asked Questions

What does this do?
Paste Terraform (.tf) and it converts each resource block into Pulumi code in TypeScript, Python or Go.
How are types mapped?
A built-in map translates Terraform resource types to Pulumi types (e.g. aws_instance to aws.ec2.Instance), with a best-effort fallback for unknown types.
Is the parse real?
Yes. It uses a client-side HCL parser and carries attributes into the Pulumi constructors.
Does this upload my config?
No. Everything is parsed in your browser.
Can I download it?
Yes. Copy, download or print the generated code.