pulumi-migrate-from-discovered-stack
Scope: this skill only applies to stacks Pulumi Cloud's Discovery feature has already scanned and exposed through the discovered-stacks API (GET .../discovered-stacks/{projectName}/{stackName}/resources, see below). It is not for migrating an arbitrary CloudFormation/ARM template or account that Discovery hasn't scanned yet — if no discovered stack exists for the source, this skill has nothing to read and does not apply.
Do not load
cloudformation-to-pulumiorpulumi-arm-to-pulumialongside this skill. Those two skills prescribe a template-first workflow (mechanical translation → import) and mandateaws-nativefor AWS. This skill is cloud-state-first (import from discovered state → optional refactor against the template later) and defaults toawsclassic /azure-native. The useful reference material from those two skills has been curated intocloudformation.mdandarm.mdin this folder.
Plan adjustment
If you already generated a migration plan before loading this skill, review it against the workflow below and update it — the phases here supersede any earlier plan. Communicate the adjusted plan to the user before proceeding.
Success criteria
A migration is complete when:
- Complete resource coverage — every discovered resource is imported OR has an annotation explaining why not.
- Zero-diff —
pulumi previewshows no changes. This proves the code matches the cloud state exactly. - Progress tracked via the API — use
compareToand migration annotations so progress is visible in Pulumi Cloud, not just in agent memory. - PR as the output — a pull request with the migrated code and a migration report.