pulumi-terraform-to-pulumi

Migrate Terraform projects and state to Pulumi stacks using the terraform-migrate plugin.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/AdityaBorkar/igbot-fork --skill pulumi-terraform-to-pulumi-adityaborkar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pulumi-terraform-to-pulumi
Source: https://github.com/AdityaBorkar/igbot-fork/tree/main/.agents/skills/pulumi-terraform-to-pulumi
Command: npx skills add https://github.com/AdityaBorkar/igbot-fork --skill pulumi-terraform-to-pulumi-adityaborkar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Moving infrastructure from Terraform to Pulumi requires translating HCL source code, converting state files, and installing matching providers, which is error-prone when done manually. ## Core Features & Use Cases - State Translation: Runs the terraform-migrate plugin to generate a Pulumi state draft from existing Terraform sources and imports it into a Pulumi stack. - Provider Dependency Management: Reads the generated required-providers file and installs exact provider versions via the language-specific package manager (npm, pip, go get, dotnet). - Source Code Translation: Converts HCL configurations into Pulumi code in TypeScript, Python, Go, C#, or YAML, then iterates with pulumi preview until the diff is empty. - Use Case: A team with an existing Terraform-managed AWS environment wants to adopt Pulumi in TypeScript; this Skill translates the state and source, verifies parity with previews, and prepares a pull request. ## Quick Start Migrate my Terraform project in ./infra to a Pulumi TypeScript project under ./pulumi-infra and verify the preview shows no changes.

Frequently Asked Questions about pulumi-terraform-to-pulumi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Terraform to Pulumi?▼

Use the terraform-migrate plugin via pulumi plugin run to translate Terraform state into a Pulumi state draft, import it with pulumi stack import, then rewrite the HCL source in your target Pulumi language until pulumi preview shows no changes.

How to convert Terraform HCL to Pulumi TypeScript?▼

Create an empty Pulumi TypeScript project, generate the state draft with the terraform-migrate plugin, and translate the HCL resources to match the Pulumi resource types and names recorded in the state file. Iterate with pulumi preview until the diff is empty.

Does the Terraform to Pulumi migration preserve existing infrastructure state?▼

Yes. The terraform-migrate plugin produces a state draft that is imported into the Pulumi stack with pulumi stack import, so existing deployed resources are adopted rather than recreated.

Why does terraform-migrate fail with a tofu refresh authorization error?▼

The plugin fails when tofu refresh lacks provider credentials. Do not skip the step; instead run the command inside a Pulumi ESC environment that supplies the required provider credentials so the refresh can succeed.

Should I use pulumi convert or pulumi package add terraform-module for migration?▼

No. This workflow explicitly avoids pulumi convert and pulumi package add terraform-module; it uses the terraform-migrate plugin instead, which handles both state translation and provider version detection.