pulumi-terraform-to-pulumi

pulumi-terraform-to-pulumi is a skill for Claude Code, Codex from pulumi/agent-skills. It costs 84 tokens per session (905 once invoked), scanned A, original, Apache-2.0.

A migration guide for moving infrastructure projects from Terraform or OpenTofu into Pulumi, a tool that manages cloud resources using code. It covers translating HCL configuration and importing existing Terraform state into a Pulumi stack.

In plain words
What is it for?
Use it to convert Terraform files, create the Pulumi project in the repository, set up a stack, and import resources from a local Terraform state file.
Why use it?
It helps avoid losing the link between existing cloud resources and their new Pulumi definitions during the move. It also clarifies choices such as the Pulumi language and whether to migrate state or only source code.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the pulumi-migration plugin — 5 skills shipped together

Good fit Use it to convert Terraform files, create the Pulumi project in the repository, set up a stack, and import resources from a local Terraform state file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pulumi/agent-skills/pulumi-terraform-to-pulumi
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pulumi/agent-skills --skill pulumi-terraform-to-pulumi
Clone the repo
git clone --depth 1 https://github.com/pulumi/agent-skills

Made for: Claude Code, Codex.

Or install pulumi-migration, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pulumi-terraform-to-pulumi

README.md
[![agentmods](https://agentmods.dev/badge/skills/pulumi/agent-skills/pulumi-terraform-to-pulumi/github.svg)](https://agentmods.dev/skills/pulumi/agent-skills/pulumi-terraform-to-pulumi)
Your own site
<a href="https://agentmods.dev/skills/pulumi/agent-skills/pulumi-terraform-to-pulumi"><img src="https://agentmods.dev/badge/skills/pulumi/agent-skills/pulumi-terraform-to-pulumi/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pulumi-terraform-to-pulumi

Your own site · 80×15
<a href="https://agentmods.dev/skills/pulumi/agent-skills/pulumi-terraform-to-pulumi"><img src="https://agentmods.dev/badge/skills/pulumi/agent-skills/pulumi-terraform-to-pulumi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 30 Mar 2026
  • Snyk warn 30 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.00905
Opus 5 $0.00042 $0.00452
Sonnet 5 $0.00017 $0.00181
Haiku 4.5 $0.00008 $0.00090

Measured 12d ago against content hash 52a1377b3912, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

pulumi-terraform-to-pulumi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

migration/skills/pulumi-terraform-to-pulumi/SKILL.md · 81 lines

What it actually says

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/[email protected]

# Python
pip install pulumi_aws==7.12.0

# Go
go get github.com/pulumi/pulumi-aws/sdk/[email protected]

# 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.

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 81 lines · 84 tokens per session scan A 52a1377b3912

Subscribe to this mod's changes

pulumi-terraform-to-pulumi is a skill published in the GitHub repository pulumi/agent-skills (68 stars, last pushed yesterday), licensed Apache-2.0. It adds 84 tokens to every session and 905 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

infrastructure-as-code-guardian

Universal Infrastructure as Code (IaC) agent skill for authoring, securing, and managing cloud infrastructure across Terraform, Pulumi, CloudFormation, Ansible, and Bicep. Provides cross-tool security hardening, state management best practices, cost optimization, drift detection, and CI/CD integration. Covers AWS…

JPeetz/agent-skills · 254 tokens

terraform-expert

Expert-level Terraform infrastructure as code, modules, state management, and production best practices. Use when the user mentions infrastructure as code, devops, or automation, or when the task involves Terraform Basics, Resource Management, Modules, or State Management.

personamanagmentlayer/pcl · 53 tokens

terraform-docs

Terraform 1.15.x — configuration language, resources, variables, modules, state, backends, providers, functions.

pledgeandgrow/pledge-skills · 29 tokens

Terraform Infrastructure as Code

Production-grade Terraform development with HCL best practices, module design, state management, multi-cloud patterns, and AI-enhanced infrastructure as code for scalable cloud deployments.

bobmatnyc/mcp-skillset · 36 tokens

activate-site

Activates and provisions a Power Pages website in a Power Platform environment via the Power Platform REST API. Use when the user wants to activate, provision, turn on, or enable a Power Pages website or portal.

microsoft/power-platform-skills · 45 tokens

deploy

Builds and deploys a Power Apps code app to Power Platform. Use when deploying changes, redeploying an existing app, or pushing updates.

microsoft/power-platform-skills · 32 tokens