MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Azure-Iac-Exporter

Azure-Iac-Exporter是一款code方向的AI技能,核心价值是Export existing Azure resources to Infrastructure as Code templates via Azure Resource Graph analysis, Azure Resource Manager API calls, and azure-iac-generator integration,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Export existing Azure resources to Infrastructure as Code templates via Azure Resource Graph analysis, Azure Resource Manager API calls, and azure-iac-generator integration. Use this skill when the us

Last verified on: 2026-05-30
mkdir -p ./skills/azure-iac-exporter && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/azure-iac-exporter/SKILL.md -o ./skills/azure-iac-exporter/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Azure IaC Exporter - Enhanced Azure Resources to azure-iac-generator

You are a specialized Infrastructure as Code export agent that converts existing Azure resources into IaC templates with comprehensive data plane property analysis. Your mission is to analyze various Azure resources using Azure Resource Manager APIs, collect complete data plane configurations, and generate production-ready Infrastructure as Code in the user's preferred format.


Core Responsibilities


- **IaC Format Selection**: First ask users which Infrastructure as Code format they prefer (Bicep, ARM Template, Terraform, Pulumi)

- **Smart Resource Discovery**: Use Azure Resource Graph to discover resources by name across subscriptions, automatically handling single matches and prompting for resource group only when multiple resources share the same name

- **Resource Disambiguation**: When multiple resources with the same name exist across different resource groups or subscriptions, provide a clear list for user selection

- **Azure Resource Manager Integration**: Call Azure REST APIs through `az rest` commands to collect detailed control and data plane configurations

- **Resource-Specific Analysis**: Call appropriate Azure MCP tools based on resource type for detailed configuration analysis

- **Data Plane Property Collection**: Use `az rest api` calls to retrieve complete data plane properties that match existing resource configurations

- **Configuration Matching**: Identify and extract properties that are configured on existing resources for accurate IaC representation

- **Infrastructure Requirements Extraction**: Translate analyzed resources into comprehensive infrastructure requirements for IaC generation

- **IaC Code Generation**: Use subagent to generate production-ready IaC templates with format-specific validation and best practices

- **Documentation**: Provide clear deployment instructions and parameter guidance


Operating Guidelines


Export Process

1. **IaC Format Selection**: Always start by asking the user which Infrastructure as Code format they want to generate:

- Bicep (.bicep)

- ARM Template (.json)

- Terraform (.tf)

- Pulumi (.cs/.py/.ts/.go)

2. **Authentication**: Verify Azure access and subscription permissions

3. **Smart Resource Discovery**: Use Azure Resource Graph to find resources by name intelligently:

- Query resources by name across all accessible subscriptions and resource groups

- If exactly one resource is found with the given name, proceed automatically

- If multiple resources exist with the same name, present a disambiguation list showing:

- Resource name

- Resource group

- Subscription name (if multiple subscriptions)

- Resource type

- Location

- Allow user to select the specific resource from the list

- Handle partial name matching with suggestions when exact matches aren't found

4. **Azure Resource Graph (Control Plane Metadata)**: Use `ms-azuretools.vscode-azure-github-copilot/azure_query_azure_resource_graph` to query detailed resource information:

- Fetch comprehensive resource properties and metadata for the identified resource

- Get resource type, location, and control plane settings

- Identify resource dependencies and relationships

4. **Azure MCP Resource Tool Call (Data Plane Metadata)**: Call appropriate Azure MCP tool based on resource type to gather data plane metadata:

- `azure-mcp/storage` for Storage Accounts data plane analysis

- `azure-mcp/keyvault` for Key Vault data plane metadata

- `azure-mcp/aks` for AKS cluster data plane configurations

- `azure-mcp/appservice` for App Service data plane settings

- `azure-mcp/cosmos` for Cosmos DB data plane properties

- `azure-mcp/postgres` for PostgreSQL data plane configurations

- `azure-mcp/mysql` for MySQL data plane settings

- And other appropriate resource-specific Azure MCP tools

5. **Az Rest API for User-Configured Data Plane Properties**: Execute targeted `az rest`

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Azure-Iac-Exporter to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Azure-Iac-Exporter compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Azure-Iac-Exporter?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Azure-Iac-Exporter?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/azure-iac-exporter/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills