Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pulumi avatar

Pulumi Terraform To Pulumi

  • 757 installs
  • 63 repo stars
  • Updated August 3, 2026
  • pulumi/agent-skills

The pulumi-terraform-to-pulumi skill walks full Terraform-to-Pulumi migrations without pulumi convert, using terraform-migrate plugin for state mapping instead.

About

The pulumi-terraform-to-pulumi skill walks full Terraform-to-Pulumi migrations without pulumi convert, using terraform-migrate plugin for state mapping instead. Agents confirm terraform_dir, pulumi_dir, target language, and whether to import state before creating an empty Pulumi project inside the repo, running pulumi_up, pulling remote tfstate when needed, generating /tmp/pulumi-state.json and required-providers.json, installing provider packages at pinned versions, importing stack state, and iterating until pulumi_preview shows an empty diff. Critical constraints forbid pulumi convert, terraform-module package add, and writing under /workspace. ESC environment linking is offered for credentials. Ends with a pull request of migrated code.

  • Uses terraform-migrate plugin instead of pulumi convert.
  • Imports translated tfstate into a new Pulumi stack.
  • Installs required providers from generated JSON manifest.
  • Iterates until pulumi preview diff is empty.
  • Creates PR with migrated Pulumi project in-repo.

Pulumi Terraform To Pulumi by the numbers

  • 757 all-time installs (skills.sh)
  • +37 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #333 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

pulumi-terraform-to-pulumi capabilities & compatibility

Capabilities
uses terraform migrate plugin instead of pulumi · imports translated tfstate into a new pulumi sta · installs required providers from generated json · iterates until pulumi preview diff is empty.
Use cases
orchestration
npx skills add https://github.com/pulumi/agent-skills --skill pulumi-terraform-to-pulumi

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs757
repo stars63
Security audit2 / 3 scanners passed
Last updatedAugust 3, 2026
Repositorypulumi/agent-skills

How do I apply pulumi-terraform-to-pulumi using the workflow in its SKILL.md?

Migrate Terraform or OpenTofu projects to Pulumi using terraform-migrate state import and source translation.

Who is it for?

Developers following the pulumi-terraform-to-pulumi skill for the tasks it documents.

Skip if: Tasks outside the pulumi-terraform-to-pulumi scope described in SKILL.md.

When should I use this skill?

User mentions pulumi-terraform-to-pulumi or related triggers from the skill description.

What you get

Working pulumi-terraform-to-pulumi setup aligned with the documented patterns and constraints.

  • Pulumi project source
  • imported Pulumi stack state

Files

SKILL.mdMarkdownGitHub ↗

Migrating from Terraform to Pulumi

Critical constraints — read before acting:
- Do NOT run pulumi convert — use the terraform-migrate plugin instead, which preserves state mapping.
- Do NOT run pulumi package add terraform-module — this is for a different workflow.
- Do NOT create the Pulumi project under /workspace — create it inside the checked-out repo.
- Replace ${terraform_dir} and ${pulumi_dir} below with the actual paths confirmed with the user.

First establish scope and plan the migration by working out with the user:

  • where the Terraform sources are (${terraform_dir})
  • where the migrated Pulumi project lives (${pulumi_dir})
  • what is the target Pulumi language (such as TypeScript, Python, YAML)
  • whether migration aims to setup Pulumi stack states, or only translate source code

Confirm the plan with the user before proceeding.

Create a new Pulumi project in ${pulumi_dir} in the chosen language. Edit sources to be empty and not declare any resources. Ensure a Pulumi stack exists.

You must run pulumi_up tool before proceeding to ensure initial stack state is written.

If no local .tfstate file exists in ${terraform_dir}, the state may be in a remote backend (S3, Pulumi Cloud, Terraform Cloud, etc.). Pull it before proceeding:

cd ${terraform_dir} && terraform state pull > terraform.tfstate

This works for all backends, including Pulumi Cloud. If terraform is not available, try tofu state pull instead.

Now produce a draft Pulumi state translation:

pulumi plugin run terraform-migrate -- stack \ --from ${terraform_dir} \ --to ${pulumi_dir} \ --out /tmp/pulumi-state.json \ --plugins /tmp/required-providers.json

Do NOT install the plugin as it will auto-install as needed.

Sometimes terraform-migrate plugin fails because tofu refresh is not authorized. DO NOT skip this step. Work with the user to find or build a Pulumi ESC environment that provides the necessary credentials so the command can succeed. If setting up an ESC environment is not feasible, inform the user that the migration cannot proceed automatically.

Read the generated /tmp/required-providers.json and install all these Pulumi providers into the new project, respecting the suggested versions even if they downgrade an already installed provider. The file will contain records such as [{"name":"aws","version":"7.12.0"}].

Install providers as project dependencies using the language-specific package manager (NOT pulumi plugin install, which only downloads plugins without adding dependencies):

TypeScript/JavaScript

npm install @pulumi/aws@7.12.0

Python

pip install pulumi_aws==7.12.0

Go

go get github.com/pulumi/pulumi-aws/sdk/v7@v7.12.0

C#

dotnet add package Pulumi.Aws --version 7.12.0

Import the translated state draft (/tmp/pulumi-state.json) into the Pulumi stack:

pulumi stack import --file /tmp/pulumi-state.json

Translate source code to match both the Terraform source and the translated state. Aim for exact match. You can consult the state draft /tmp/pulumi-state.json for Pulumi resource types and names to use.

Iterate on fixing the source code until pulumi_preview tool confirms that there are no changes to make and the diff is empty or almost empty. Provider diffs or diffs on tags may be OK.

Offer the user to link an ESC environment to the stack so that each Pulumi stack can seamlessly have access to the provider credentials it needs.

When all looks good, create a Pull Request with the migrated source code.

Related skills

How it compares

Use pulumi-terraform-to-pulumi for state-preserving HCL migration; use greenfield Pulumi skills when no Terraform tfstate exists to import.

FAQ

What does pulumi-terraform-to-pulumi do?

Migrate Terraform or OpenTofu projects to Pulumi using terraform-migrate state import and source translation.

When should I use pulumi-terraform-to-pulumi?

Invoke when Migrate Terraform or OpenTofu projects to Pulumi using terraform-migrate state import and source translation.

Is pulumi-terraform-to-pulumi safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.