# Pulumi terraform to pulumi

> Pulumi terraform to pulumi is an open-source agent skill for cloud and infrastructure. Guides an agent through migrating Terraform or OpenTofu projects and state into Pulumi. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/pulumi/agent-skills/tree/main/migration/skills/pulumi-terraform-to-pulumi
- **Repository:** https://github.com/pulumi/agent-skills
- **GitHub stars:** 82
- **License:** Apache-2.0
- **Skill name:** pulumi-terraform-to-pulumi
- **Collection:** https://github.com/pulumi/agent-skills
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through moving an existing Terraform or OpenTofu setup into a new Pulumi project. It covers translating HCL source into a chosen Pulumi language and optionally importing Terraform state into a Pulumi stack, including pulling state from a remote backend when no local file exists.

The workflow starts by confirming the source and target directories, the target language and whether state should be migrated or only the code. The agent creates an empty Pulumi project and stack, runs a state translation through the terraform-migrate plugin, installs the providers that the generated list recommends as ordinary project dependencies, and imports the translated state. It then edits the Pulumi code until a preview shows little or no drift, and finishes by offering to link an ESC environment for provider credentials and opening a pull request.

The instructions forbid a few shortcuts, such as running pulumi convert or the terraform-module package command, and require the user's credentials to be set up through ESC when the translation step needs them. Terraform or tofu must be available locally for state pulls, and the user needs access to the relevant cloud or backend credentials.

## When your agent uses it

> Migrate Terraform/OpenTofu projects to Pulumi, including translating HCL source code and/or importing Terraform state into a Pulumi stack. Use when a user wants to convert Terraform to Pulumi, migrate from HCL, or import tfstate into Pulumi. Do NOT trigger for general Terraform-vs-Pulumi comparisons or questions about using both tools side-by-side.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/pulumi/agent-skills/tree/HEAD/migration/skills/pulumi-terraform-to-pulumi)
- [License: Apache-2.0](https://github.com/pulumi/agent-skills/tree/HEAD/migration/skills/pulumi-terraform-to-pulumi)

## Features

- **Scoped migration planning:** Confirms source and target paths, the Pulumi language and whether state is migrated before any changes.
- **Terraform state pulling:** Retrieves state from a remote backend with terraform or tofu when no local tfstate file is present.
- **State translation draft:** Runs the terraform-migrate plugin to produce a Pulumi state file and a list of required providers.
- **Provider dependency install:** Adds the recommended provider versions as project dependencies using the language's package manager.
- **Preview-driven code fixing:** Iterates on translated source until a Pulumi preview shows an empty or nearly empty diff.
- **ESC credential linking:** Offers to attach a Pulumi ESC environment so each stack has the provider credentials it needs.

## Good for

- Convert my Terraform project to Pulumi TypeScript
- Import my tfstate file into a new Pulumi stack
- Move an OpenTofu setup with a remote S3 backend to Pulumi
- Translate HCL modules into Pulumi Python code and check the preview
- Set up Pulumi providers matching my migrated Terraform resources

## Install

### Claude Code

This skill ships in the `pulumi-migration` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add pulumi/agent-skills
/plugin install pulumi-migration@pulumi-agent-skills
```

Or copy only this skill to `~/.claude/skills/pulumi-terraform-to-pulumi`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/pulumi-terraform-to-pulumi &&
cp -R "$tmp/migration/skills/pulumi-terraform-to-pulumi" ~/.claude/skills/pulumi-terraform-to-pulumi &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/pulumi-terraform-to-pulumi` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/pulumi-terraform-to-pulumi` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/pulumi-terraform-to-pulumi &&
cp -R "$tmp/migration/skills/pulumi-terraform-to-pulumi" ~/.agents/skills/pulumi-terraform-to-pulumi &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/pulumi-terraform-to-pulumi` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/pulumi-terraform-to-pulumi` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/pulumi-terraform-to-pulumi &&
cp -R "$tmp/migration/skills/pulumi-terraform-to-pulumi" ~/.cursor/skills/pulumi-terraform-to-pulumi &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/pulumi-terraform-to-pulumi` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/pulumi/agent-skills.git --path migration/skills/pulumi-terraform-to-pulumi
```

Or copy the folder to `~/.gemini/skills/pulumi-terraform-to-pulumi` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/pulumi-terraform-to-pulumi`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/pulumi-terraform-to-pulumi &&
cp -R "$tmp/migration/skills/pulumi-terraform-to-pulumi" ~/.copilot/skills/pulumi-terraform-to-pulumi &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/pulumi-terraform-to-pulumi` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/pulumi/agent-skills.git
```

Then copy `agent-skills/migration/skills/pulumi-terraform-to-pulumi` into your agent's skills folder as `pulumi-terraform-to-pulumi`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Pulumi terraform to pulumi trigger?

When a user wants to convert Terraform to Pulumi, migrate from HCL, or import tfstate into Pulumi. It does not trigger for general Terraform-versus-Pulumi comparisons or side-by-side use questions.

### What tools does the migration need?

It uses the terraform-migrate plugin via pulumi plugin run, and terraform or tofu for pulling state from a remote backend. Credentials for refresh may need a Pulumi ESC environment.

### Does Pulumi terraform to pulumi run pulumi convert?

No. The instructions explicitly say not to run pulumi convert and to use the terraform-migrate plugin, which preserves state mapping.

### How are providers installed?

The agent installs the provider versions listed in the generated file as project dependencies with npm, pip, go get or dotnet, not with pulumi plugin install.

### Does Pulumi terraform to pulumi finish with a pull request?

Yes. Once the preview is clean, the instructions say to create a pull request containing the migrated source code.

### How do I install Pulumi terraform to pulumi in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/pulumi-terraform-to-pulumi to use it in all your projects, or to .claude/skills/pulumi-terraform-to-pulumi in one project. Or install the pulumi-migration plugin, which includes it: /plugin marketplace add pulumi/agent-skills, then /plugin install pulumi-migration@pulumi-agent-skills.

### Does Pulumi terraform to pulumi run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Pulumi terraform to pulumi?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Pulumi terraform to pulumi?

The closest alternatives to Pulumi terraform to pulumi are Pulumi overview, Cloudformation to pulumi, Pulumi migrate from discovered stack, Pulumi arm to pulumi and Pulumi cdk to pulumi.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Pulumi overview](https://ai-powered.com/skills/pulumi-overview): Pulumi overview is an open-source agent skill for cloud and infrastructure.
- [Cloudformation to pulumi](https://ai-powered.com/skills/cloudformation-to-pulumi): Cloudformation to pulumi is an open-source agent skill for cloud and infrastructure.
- [Pulumi migrate from discovered stack](https://ai-powered.com/skills/pulumi-migrate-from-discovered-stack): Pulumi migrate from discovered stack is an open-source agent skill for cloud and infrastructure.
- [Pulumi arm to pulumi](https://ai-powered.com/skills/pulumi-arm-to-pulumi): Pulumi arm to pulumi is an open-source agent skill for cloud and infrastructure.
- [Pulumi cdk to pulumi](https://ai-powered.com/skills/pulumi-cdk-to-pulumi): Pulumi cdk to pulumi is an open-source agent skill for cloud and infrastructure.
- [Pulumi esc](https://ai-powered.com/skills/pulumi-esc): Pulumi esc is an open-source agent skill for cloud and infrastructure.
- [Pulumi automation API](https://ai-powered.com/skills/pulumi-automation-api): Pulumi automation API is an open-source agent skill for cloud and infrastructure.
- [Pulumi create agent](https://ai-powered.com/skills/pulumi-create-agent): Pulumi create agent is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/pulumi-terraform-to-pulumi
