AWS IaC Converter
Convert AWS Infrastructure as Code between CloudFormation, CDK (TypeScript/Python), and Terraform with a structured, interactive workflow.
Dependency: This skill requires AWS MCP tools. If MCP tools are unavailable, run /aws-mcp-setup first.
Supported Conversions
| Source |
Target Options |
| CloudFormation |
CDK (TypeScript/Python), Terraform |
| CDK |
CloudFormation, Terraform |
| Terraform |
CloudFormation, CDK (TypeScript/Python) |
MCP Server Integration
| Server |
Purpose |
| AWS IaC MCP Server |
CloudFormation validation, CDK docs, compliance checking |
| Terraform MCP Server |
Terraform validation, security scanning, provider docs |
| AWS Documentation MCP |
Service feature verification, API reference |
Before Converting
- Always verify resource properties using MCP tools to ensure accurate mapping
- If MCP tools are unavailable, run
/aws-mcp-setup to configure them
Workflow Structure
This skill keeps its own planning and verification steps:
- Planning (Phases 1–4) — Repo analysis, IaC detection, target selection, and conversion plan are IaC-conversion specific.
- Implementation (Phase 5) — Delegated to the
orchestrator subagent's implementer.
- Verification & Reporting (Phases 6–7) — Conversion-specific validation and
CONVERSION-REPORT.md generation.
Workflow
Phase 1: Repository Input
- Ask the user for the source code repository URL.
- Do NOT proceed until the user provides the URL.
- Accept: GitHub URL, GitLab URL, Bitbucket URL, or local path.
- If the URL is a remote repository, clone it into a temporary working directory.
- If the URL is a local path, confirm it exists and is accessible.
Phase 2: Analysis & Detection
Analyze the repository to identify all AWS IaC code. Run the analysis script:
bash .cursor/skills/aws-iac-converter/scripts/analyze-repo.sh <repo-path>
Identify the IaC type(s) found. Detection rules: .cursor/skills/aws-iac-converter/references/analysis-guide.md.
Present findings to the user:
- IaC type detected (CloudFormation, CDK, Terraform, or mixed)
- Files and directories containing IaC code
- AWS resources identified
- Any non-IaC code detected
Phase 3: Target Selection
- Ask the user for the target IaC type.
- Do NOT proceed until the user provides the target type.
- The target type must be different from the source type.
- If CDK is selected, ask for the language preference (TypeScript or Python).
- Validate the selection and confirm with the user.
Phase 4: Conversion Planning
Create a detailed conversion plan covering:
- Target output path — Directory where converted code will be written (e.g.
<workspace>/converted-terraform).
- Resource-by-resource mapping from source to target
- Parameter/variable conversion strategy
- Output/export handling
- State management considerations (especially for Terraform)
- Dependencies and ordering
- Resources that cannot be directly converted (with workarounds)
- Conversion patterns:
.cursor/skills/aws-iac-converter/references/conversion-patterns.md
Present the plan to the user for review.
- Show a summary table of resources and their conversion status
- Highlight any risks, limitations, or manual steps required
- Do NOT proceed until the user approves the plan.
Phase 5: Implementation
- Delegate implementation to the orchestrator subagent — Invoke the orchestrator agent with:
- Input: The approved conversion plan (including target output path), target IaC stack/scope, and source repo path.
- Orchestrator: Skip the planner. Run only the implementer subagent for the target IaC stack.
- Resume: After the implementer completes, resume this skill at Phase 6.
Phase 6: Verification
Verify the converted code. Run:
bash .cursor/skills/aws-iac-converter/scripts/validate-conversion.sh <target-path> <target-type>
Resolve all lint/validation failures. Do not resolve security-specific findings — record them for the report only. See .cursor/skills/aws-iac-converter/references/verification-checklist.md.
Phase 7: Reporting
Generate a conversion report at <target-output-path>/CONVERSION-REPORT.md.
- Template:
.cursor/skills/aws-iac-converter/references/report-template.md
- Include: source-to-target resource mapping, validation results, security findings, recommendations.
Summarize to the user:
- Total resources converted vs. total in source
- Any resources requiring manual attention
- Location of converted code and report
- Suggested next steps
Output Layout
<target-output-path>/
├── <converted IaC files>
├── <dependency files> # package.json, requirements.txt, versions.tf, etc.
├── README.md
└── CONVERSION-REPORT.md
Key Principles
- Wait for user input at checkpoints (repo URL, target type, plan approval). Do not proceed until provided.
- Implementation is only via the orchestrator's implementer subagent.
- Resolve lint/validation in Phase 6; record security findings only.
References: .cursor/skills/aws-iac-converter/references/ contains: analysis-guide.md, conversion-patterns.md, report-template.md, verification-checklist.md
1---2name: aws-iac-converter3description: Convert AWS Infrastructure as Code between CloudFormation, CDK (TypeScript/Python), and Terraform. Use when converting IaC code from one format to another, migrating infrastructure definitions, or when the user mentions IaC conversion, CloudFormation to Terraform, CDK to CloudFormation, Terraform to CDK, or any AWS IaC migration.4---56# AWS IaC Converter78Convert AWS Infrastructure as Code between CloudFormation, CDK (TypeScript/Python), and Terraform with a structured, interactive workflow.910> **Dependency**: This skill requires AWS MCP tools. If MCP tools are unavailable, run `/aws-mcp-setup` first.1112## Supported Conversions1314| Source | Target Options |15| ----------------- | ---------------------------------------- |16| **CloudFormation** | CDK (TypeScript/Python), Terraform |17| **CDK** | CloudFormation, Terraform |18| **Terraform** | CloudFormation, CDK (TypeScript/Python) |1920## MCP Server Integration2122| Server | Purpose |23| ----------------------------------- | ------------------------------------------------------------ |24| **AWS IaC MCP Server** | CloudFormation validation, CDK docs, compliance checking |25| **Terraform MCP Server** | Terraform validation, security scanning, provider docs |26| **AWS Documentation MCP** | Service feature verification, API reference |2728### Before Converting29301. **Always verify** resource properties using MCP tools to ensure accurate mapping312. If MCP tools are unavailable, run `/aws-mcp-setup` to configure them3233### Workflow Structure3435This skill keeps its own planning and verification steps:3637- **Planning (Phases 1–4)** — Repo analysis, IaC detection, target selection, and conversion plan are IaC-conversion specific.38- **Implementation (Phase 5)** — Delegated to the `orchestrator` subagent's implementer.39- **Verification & Reporting (Phases 6–7)** — Conversion-specific validation and `CONVERSION-REPORT.md` generation.4041## Workflow4243### Phase 1: Repository Input44451. **Ask the user** for the source code repository URL.46 - **Do NOT proceed** until the user provides the URL.47 - Accept: GitHub URL, GitLab URL, Bitbucket URL, or local path.482. If the URL is a remote repository, clone it into a temporary working directory.493. If the URL is a local path, confirm it exists and is accessible.5051### Phase 2: Analysis & Detection52534. **Analyze the repository** to identify all AWS IaC code. Run the analysis script:5455 ```bash56 bash .cursor/skills/aws-iac-converter/scripts/analyze-repo.sh <repo-path>57 ```58595. **Identify the IaC type(s)** found. Detection rules: `.cursor/skills/aws-iac-converter/references/analysis-guide.md`.606. **Present findings** to the user:61 - IaC type detected (CloudFormation, CDK, Terraform, or mixed)62 - Files and directories containing IaC code63 - AWS resources identified64 - Any non-IaC code detected6566### Phase 3: Target Selection67687. **Ask the user** for the target IaC type.69 - **Do NOT proceed** until the user provides the target type.70 - The target type **must be different** from the source type.71 - If CDK is selected, ask for the language preference (TypeScript or Python).72 - Validate the selection and confirm with the user.7374### Phase 4: Conversion Planning75768. **Create a detailed conversion plan** covering:77 - **Target output path** — Directory where converted code will be written (e.g. `<workspace>/converted-terraform`).78 - Resource-by-resource mapping from source to target79 - Parameter/variable conversion strategy80 - Output/export handling81 - State management considerations (especially for Terraform)82 - Dependencies and ordering83 - Resources that **cannot** be directly converted (with workarounds)84 - Conversion patterns: `.cursor/skills/aws-iac-converter/references/conversion-patterns.md`85869. **Present the plan** to the user for review.87 - Show a summary table of resources and their conversion status88 - Highlight any risks, limitations, or manual steps required89 - **Do NOT proceed** until the user approves the plan.9091### Phase 5: Implementation929310. **Delegate implementation to the orchestrator subagent** — Invoke the orchestrator agent with:94 - **Input**: The approved conversion plan (including target output path), target IaC stack/scope, and source repo path.95 - **Orchestrator**: Skip the planner. Run only the implementer subagent for the target IaC stack.96 - **Resume**: After the implementer completes, resume this skill at Phase 6.9798### Phase 6: Verification9910011. **Verify** the converted code. Run:101102 ```bash103 bash .cursor/skills/aws-iac-converter/scripts/validate-conversion.sh <target-path> <target-type>104 ```10510612. **Resolve** all lint/validation failures. **Do not resolve** security-specific findings — record them for the report only. See `.cursor/skills/aws-iac-converter/references/verification-checklist.md`.107108### Phase 7: Reporting10911013. **Generate a conversion report** at `<target-output-path>/CONVERSION-REPORT.md`.111 - Template: `.cursor/skills/aws-iac-converter/references/report-template.md`112 - Include: source-to-target resource mapping, validation results, security findings, recommendations.11311414. **Summarize to the user**:115 - Total resources converted vs. total in source116 - Any resources requiring manual attention117 - Location of converted code and report118 - Suggested next steps119120## Output Layout121122```123<target-output-path>/124├── <converted IaC files>125├── <dependency files> # package.json, requirements.txt, versions.tf, etc.126├── README.md127└── CONVERSION-REPORT.md128```129130## Key Principles131132- Wait for user input at checkpoints (repo URL, target type, plan approval). Do not proceed until provided.133- Implementation is **only** via the orchestrator's implementer subagent.134- Resolve lint/validation in Phase 6; record security findings only.135136**References:** `.cursor/skills/aws-iac-converter/references/` contains: `analysis-guide.md`, `conversion-patterns.md`, `report-template.md`, `verification-checklist.md`