Fix errors · Skill
Debug a failed Pulumi operation
debug-pulumi-failed-operation
Reads a failed Pulumi update or preview from the recorded engine events and says whether the fix is the program, the state, or the credentials. Use when the user wants to debug a failed pulumi up, a failed pulumi preview, or an update that stopped halfway. New infrastructure is a different task.
Works with: Any AI Not yet model-tested; testing Jan 2027
Paste it into ChatGPT, Claude, Gemini or any AI chat, then tell it about your project. How it works
Install in Claude Code, Cursor or Codex (optional)
Only for AI coding tools that read skill folders. Run one line in a terminal, in your project folder. It downloads this skill's text files from TheSkillVault and nothing else; you can read them first with “View raw SKILL.md”.
Claude Code (all your projects)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/raw' -o ~/'.claude/skills/debug-pulumi-failed-operation/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/files/LICENSE.txt' -o ~/'.claude/skills/debug-pulumi-failed-operation/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/files/NOTICE.txt' -o ~/'.claude/skills/debug-pulumi-failed-operation/NOTICE.txt'Cursor (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/raw' -o '.cursor/skills/debug-pulumi-failed-operation/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/files/LICENSE.txt' -o '.cursor/skills/debug-pulumi-failed-operation/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/files/NOTICE.txt' -o '.cursor/skills/debug-pulumi-failed-operation/NOTICE.txt'Codex and other Agent Skills tools (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/raw' -o '.agents/skills/debug-pulumi-failed-operation/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/files/LICENSE.txt' -o '.agents/skills/debug-pulumi-failed-operation/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/debug-pulumi-failed-operation/files/NOTICE.txt' -o '.agents/skills/debug-pulumi-failed-operation/NOTICE.txt'
Or connect the whole library over MCP
Add TheSkillVault to Cursor or add this to your app's MCP settings (read-only; help):
{
"mcpServers": {
"theskillvault": {
"url": "https://theskillvault.ai/mcp"
}
}
}Pulumi already stored the error when the update or preview failed. Read that record. Do not run pulumi up or pulumi preview again just to see the same text.
pulumi api talks to Pulumi Cloud. Pass the stack as {org}/{project}/{stack}. You do not need that stack selected locally to read the record. You do need it selected later, when you apply a fix.
When to use
- The user points at a failed
pulumi uporpulumi preview. - They give an org, project, stack, and an update version or a preview id.
- An update stopped halfway and some resources may already have changed.
When not to use
- The user wants new infrastructure written. That is authoring, not this failure.
- The user wants a migration from Terraform or CloudFormation. That is a different task.
- The user wants a provider upgrade. Do not fold that into the fix.
Steps
- Collect org, project, stack, and the update version or preview id. Take a missing name from
pulumi stack --show-name,pulumi stack ls, orPulumi.yaml. A missing version means the latest update on that stack. - Tell the user which operation you will read. Include the version or preview id and the stack. Wait for a yes if you had to guess the operation.
- If they named no operation, find their latest one. Run
pulumi whoami. Readupdates/latestand comparerequestedBy.githubLoginwith that login. Walk back one version at a time until the login matches. Confirm that operation before you go on. - Fetch the engine events. For an update, use the
update/<version>/eventspath. For a preview, use thepreview/<preview-id>/eventspath. Pull eachdiagnosticEventmessage. Strip the<{%reset%}>color codes. - Read every diagnostic, not only
severity == "error". A provider error is taggederror. A program error on a preview often arrives as stderr taggedinfo#err. - For each error, name the resource URN and type, the file that declares it, and the inputs that feed it.
- Say where the fix belongs. The program: bad code, a wrong type, or a value used before it resolved. The state: the code is right and the cloud disagrees. The environment: a credential, a permission, OIDC, or a quota.
- Make the smallest change for that cause. For state drift,
pulumi refreshreconciles.pulumi importadopts a resource that already exists. Say what each command will change before you run it. An update that failed halfway may have already changed some resources. Check current state first. - If the diagnostic is empty, the real error is often in the log of the command the resource ran. Read that log. If you need a token or a run you cannot see, stop and ask for the one thing you need.
- Do not paste a Pulumi access token, a cloud key, or a stack password into chat. Do not put one in the repo.
Read the record
pulumi api /api/stacks/{org}/{project}/{stack}/update/<version>/events
Use the preview path when the failure was a preview. Keep the org, project, and stack in the path you were given. Do not switch stacks to make the command shorter.
Gotchas
- Selecting the wrong stack and running
pulumi upcreates a new failure. Read first. info#erris still a failure. Filtering toseverity == "error"hides the common preview bug.pulumi refreshandpulumi importchange state. They are not read-only.- A quota or an IAM denial is not fixed by editing the resource code.
Portability
Works with any language Pulumi supports. The event record is the same for TypeScript, Python, Go, C#, Java, or YAML. If you are using Terraform or another tool, this record does not exist. Do not invent a Pulumi stack to hold that error.
Example prompt
"Debug update 161 of stack vvm-dev. Read the recorded diagnostics, including info#err, and tell me if the fix is the program, the state, or the credentials. Do not run pulumi up again."
Done when
- You named the operation, the stack, and the version or preview id before editing.
- You read the stored diagnostics, including
info#err. - Each error is tied to a resource and to one of program, state, or environment.
- Any refresh or import was described before it ran.
- No token or cloud key was pasted into chat or committed.
- You did not re-run the failed update just to reprint the error.
---
Modified from "pulumi-debug-failed-operation" in pulumi/agent-skills (Apache-2.0). Attribute to Pulumi (pulumi/agent-skills). The upstream LICENSE keeps the unfilled template line. See LICENSE.txt.
Bundled files
Licence
Adapted from Pulumi (pulumi/agent-skills) (Copyright [yyyy] [name of copyright owner]. The pulumi/agent-skills LICENSE keeps that Apache template line unfilled. Attribute this skill to Pulumi (pulumi/agent-skills).), Apache License 2.0. Modified by TheSkillVault on 2026-11-25. Rewritten as a short failure guide. The read-the-record order is kept. Authoring, migration, and provider-upgrade steps were not copied. Not the original file.
Licence: Apache License 2.0. Attribution when you reuse it: Based on work by Pulumi (pulumi/agent-skills) (Copyright [yyyy] [name of copyright owner]. The pulumi/agent-skills LICENSE keeps that Apache template line unfilled. Attribute this skill to Pulumi (pulumi/agent-skills)., Apache License 2.0), https://github.com/pulumi/agent-skills/blob/60a692fb61cd61aeb39c3488de54f065eecea591/pulumi/skills/pulumi-debug-failed-operation/SKILL.md; adapted by TheSkillVault, https://theskillvault.ai