dirien/yet-another-agent-harness / .claude/skills/cloudformation-to-pulumi
cloudformation-to-pulumi
VerifiedConvert an AWS CloudFormation stack or template to Pulumi. This skill MUST be loaded whenever a user requests migration or conversion of CloudFormation to Pulumi.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.2 KB |
| agents/openai.yaml | config | 249 B |
| cfn-importer.md | markdown | 4.2 KB |
| cloudformation-id-lookup.md | markdown | 2.8 KB |
cfn-importer.md
View on GitHub# CloudFormation Stack Importer Tool
This tool imports existing AWS resources from CloudFormation stacks into Pulumi state.
## Installation
```shell
pulumi plugin install tool cdk-importer
```
## Credentials
Running the `cdk-importer` tool requires credentials loaded via Pulumi ESC.
- If the user has already provided an ESC environment, use it.
- If no ESC environment is specified, **ask the user which ESC environment to use** before proceeding with using the tool.
You MUST confirm the AWS region with the user. The results may be incorrect if ran with the wrong AWS Region. The region can be set with the `AWS_REGION` environment variable
## Commands
### program import
Import into the selected Pulumi stack using an existing Pulumi program.
```shell
pulumi plugin run cdk-importer -- program import \
--program-dir ./generated \
--stack MyStack
```
**Required flags:**
- `--program-dir`: Path to the Pulumi program (resource names must match CloudFormation Logical IDs)
- `--stack`: CloudFormation stack name (can be specified multiple times or comma-separated)
**Optional flags:**
- `--import-file`: Path to write a Pulumi bulk import file with failing resources (defaults to `import.json` when provided without a value)
- `--debug`: Enable line by line logging of imported resources
**Behavior:**
- Runs against the selected Pulumi stack.
- With `--import-file`, writes the bulk import file after import. The file will only contain entries for resources that failed to import with `<PLACEHOLDER>` ids.
- Can be run iteratively to progressively import resources.
**Example Output:**
```shell
[INFO] Getting stack resources component="cdk-importer" stack=NeoExample-Dev
[INFO] Starting up providers... component="cdk-importer"
[INFO] Importing stack... component="cdk-importer"
[INFO] Run complete component="cdk-importer" status="success" resourcesImported=50 resourcesFailedToImport=0 stack="NeoExample-Dev" importFile="/workspace/pulumi-example-app-neo/import.json" importFileExists=true
```
## Import File Output
The generated `import.json` includes:
- Full AWS resource metadata (type, logical name, provider reference, component bit, provider version)
- Property subsets captured during provider interception
Resources with composite identifiers may show `<PLACEHOLDER>` IDs that need manual completion before running `pulumi import --file import.json`.
## Unsupported Resources
**Resources that cannot be imported:**
- CloudFormation Custom Resources (`aws-native:cloudformation:CustomResourceEmulator`)
## Example Workflow
1. Convert your CloudFormation template to Pulumi (using CloudFormation Logical IDs as resource names)
2. Import into your Pulumi stack:
```shell
pulumi plugin run cdk-importer -- program import \
--program-dir ./pulumi-program-dir \
--stack MyStack
```
## Handling Failures
This tool may not support 100% of the CloudFormation resources in the stack. For unsupported resources it is necessary to find the import ID and import manually.
**Example output:**
```shell
[INFO] Getting stack resources component="cdk-importer" stack=NeoExample-Dev
[INFO] Starting up providers... component="cdk-importer"
[INFO] Importing stack... component="cdk-importer"
[INFO] Pulumi errors component="cdk-importer" details=urn:pulumi:dev::cdk-convert-example::aws:rds/proxyDefaultTargetGroup:ProxyDefaultTargetGroup::DatabaseDbClusterDbProxyProxyTargetGroupA552DCC1: Don't have an ID!: aws:rds/proxyDefaultTargetGroup:ProxyDefaultTargetGroup neo-example-dev-database-db-cluster-db-proxy-eede4daa urn:pulumi:dev::cdk-convert-example::aws:rds/proxyDefaultTargetGroup:ProxyDefaultTargetGroup::DatabaseDbClusterDbProxyProxyTargetGroupA552DCC1
update failed
[INFO] Run complete component="cdk-importer" status="failed" resourcesImported=69 resourcesFailedToImport=1 stack="NeoExample-Dev"
- operation failed
```
**Example Failure Workflow:**
1. Import ran with error
2. Review failures and run `pulumi preview`.
- Any resources that fail to import should appear as creations in the preview.
- Optionally run `program import` with the `--import-file` flag to generate a `import.json` file with the failing resources.
3. Manually import remaining resources using [cloudformation-id-lookup.md](cloudformation-id-lookup.md)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |