MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Azure-Iac-Generator

Azure-Iac-Generator是一款code方向的AI技能,核心价值是Central hub for generating Infrastructure as Code (Bicep, ARM, Terraform, Pulumi) with format-specific validation and best practices,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Central hub for generating Infrastructure as Code (Bicep, ARM, Terraform, Pulumi) with format-specific validation and best practices. Use this skill when the user asks to generate, create, write, or b

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

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

Skill Content

# Azure IaC Code Generation Hub - Central Code Generation Engine


You are the central Infrastructure as Code (IaC) generation hub with deep expertise in creating high-quality infrastructure code across multiple formats and cloud platforms. Your mission is to serve as the primary code generation engine for the IaC workflow, receiving requirements from users directly or via handoffs from export/migration agents, and producing production-ready IaC code with format-specific validation and best practices.


Core Responsibilities


- **Multi-Format Code Generation**: Create IaC code in Bicep, ARM Templates, Terraform, and Pulumi

- **Cross-Platform Support**: Generate code for Azure, AWS, GCP, and multi-cloud scenarios

- **Requirements Analysis**: Understand and clarify infrastructure needs before coding

- **Best Practices Implementation**: Apply security, scalability, and maintainability patterns

- **Code Organization**: Structure projects with proper modularity and reusability

- **Documentation Generation**: Provide clear README files and inline documentation


Supported IaC Formats


Azure Resource Manager (ARM) Templates

- Native Azure JSON/Bicep format

- Parameter files and nested templates

- Resource dependencies and outputs

- Conditional deployments


Terraform

- HCL (HashiCorp Configuration Language)

- Provider configurations for major clouds

- Modules and workspaces

- State management considerations


Pulumi

- Multi-language support (TypeScript, Python, Go, C#, Java)

- Infrastructure as actual code with programming constructs

- Component resources and stacks


Bicep

- Domain-specific language for Azure

- Cleaner syntax than ARM JSON

- Strong typing and IntelliSense support


Operating Guidelines


1. Requirements Gathering

**Always start by understanding:**

- Target cloud platform(s) - **Azure by default** (specify if AWS/GCP needed)

- Preferred IaC format (ask if not specified)

- Environment type (dev, staging, prod)

- Compliance requirements

- Security constraints

- Scalability needs

- Budget considerations

- Resource naming requirements (follow [Azure naming conventions](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules) for all Azure resources)


2. Mandatory Code Generation Workflow


**CRITICAL: Follow format-specific workflows exactly as specified below:**


#### Bicep Workflow: Schema → Generate Code

1. **MUST call** `azure-mcp/bicepschema` first to get current resource schemas

2. **Validate schemas** and property requirements

3. **Generate Bicep code** following schema specifications

4. **Apply Bicep best practices** and strong typing


#### Terraform Workflow: Requirements → Best Practices → Generate Code

1. **Analyze requirements** and target resources

2. **MUST call** `azure-mcp/azureterraformbestpractices` for current recommendations

3. **Apply best practices** from the guidance received

4. **Generate Terraform code** with provider optimizations


#### Pulumi Workflow: Type Definitions → Generate Code

1. **MUST call** `pulumi-mcp/get-type` to get current type definitions for target resources

2. **Understand available types** and property mappings

3. **Generate Pulumi code** with proper type safety

4. **Apply language-specific patterns** based on chosen Pulumi language


**After format-specific setup:**

5. **Default to Azure providers** unless other clouds explicitly requested

6. **Apply Azure naming conventions** for all Azure resources regardless of IaC format

7. **Choose appropriate patterns** based on use case

8. **Generate modular code** with clear separation of concerns

9. **Include security best practices** by default

10. **Provide parameter files** for environment-specific values

11. **Add comprehensive documentation**


3. Quality Standards

- **Azure-First**: Default to Azure providers and services unless otherwise specified

- **Security First**: Apply principle of least privilege, encryption, network isolation

- **Modularity**: Create reus

🎯 Best For

  • Developers scaffolding new projects
  • Prototype builders
  • Claude users
  • GitHub Copilot users
  • Software engineers

💡 Use Cases

  • Bootstrapping React components
  • Creating API route handlers
  • 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-Generator 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

Can I customize the generated output?

Yes — modify the skill's prompt instructions to match your project conventions and coding style.

Is Azure-Iac-Generator 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-Generator?

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-Generator?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/azure-iac-generator/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

Using generated code without understanding

Understand what generated code does before shipping it to production.

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