pulumi-terraform-to-pulumi
Automate the migration of Terraform and OpenTofu infrastructure to Pulumi, handling state mapping, provider installation, and HCL code translation.
Introduction
The pulumi-terraform-to-pulumi skill provides a structured, reliable workflow for migrating existing infrastructure-as-code projects from Terraform or OpenTofu to Pulumi. This skill is intended for DevOps engineers, cloud architects, and platform teams who need to transition their stack to Pulumi's modern, programming-language-based infrastructure management without manually re-importing resources or risking state drift. By leveraging the terraform-migrate plugin, the skill ensures that the state mapping between existing Terraform backends and new Pulumi stacks remains consistent.
- Automatically pulls remote Terraform state from various backends like S3, Pulumi Cloud, or Terraform Cloud into a manageable local file.
- Executes precise state translation using the terraform-migrate tool to map resources into a Pulumi stack without the risk of manual misconfiguration.
- Analyzes dependency requirements to identify and install the correct Pulumi provider versions (e.g., pulumi-aws, pulumi-azure-native, pulumi-gcp) directly into your project dependencies.
- Facilitates the conversion of HCL source code into idiomatic Pulumi code (TypeScript, Python, Go, or C#) by validating against the generated state.
- Orchestrates a verify-and-iterate feedback loop using pulumi-preview to confirm that the generated Pulumi code produces an empty diff compared to your existing infrastructure.
Usage notes and constraints:
- This skill should only be used when a specific migration intent is detected; do not trigger it for general Terraform vs. Pulumi comparisons or side-by-side usage questions.
- Always perform migrations within a checked-out repository; do not create projects under the root /workspace directory.
- Users must provide input parameters including the Terraform source directory path, the target Pulumi directory, and the desired target programming language.
- If terraform-migrate fails due to insufficient permissions during a refresh, users must provide or build a Pulumi ESC (Environments, Secrets, and Configuration) environment to inject the necessary provider credentials.
- Manual intervention or verification is recommended during the source code translation phase to ensure that the code is idiomatic and matches the state draft.
Repository Stats
- Stars
- 41
- Forks
- 2
- Open Issues
- 8
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 05:50 AM