azure-iac-exporter

An agent for turning existing Microsoft Azure resources into Infrastructure as Code (IaC) templates. IaC describes cloud setup in files so it can be recreated and managed consistently; supported formats include Bicep, ARM templates, Terraform, and Pulumi.

In plain words
What is it for?
Use it to export, convert, migrate, or extract Azure resources into IaC templates, including their control and data settings.
Why use it?
It removes much of the manual work of discovering Azure resources and copying their settings into deployment files.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/github/awesome-copilot/azure-iac-exporter
Clone the repo
git clone --depth 1 https://github.com/github/awesome-copilot
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,804 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.04804
Opus 5 $0.00035 $0.02402
Sonnet 5 $0.00014 $0.00961
Haiku 4.5 $0.00007 $0.00480

Measured 2d ago against content hash 4650309d9761, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

azure-iac-exporter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

agents/azure-iac-exporter.agent.md · 326 lines

How it starts

The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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
  5. 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
  6. Az Rest API for User-Configured Data Plane Properties: Execute targeted az rest commands to collect only user-configured data plane properties:
    • Query service-specific endpoints for actual configuration state
    • Compare against Azure service defaults to identify user modifications
    • Extract only properties that have been explicitly set by users:
      • Storage Account: Custom CORS settings, lifecycle policies, encryption configurations that differ from defaults
      • Key Vault: Custom access policies, network ACLs, private endpoints that have been configured
      • App Service: Application settings, connection strings, custom deployment slots
      • AKS: Custom node pool configurations, add-on settings, network policies
      • Cosmos DB: Custom consistency levels, indexing policies, firewall rules
      • Function Apps: Custom function settings, trigger configurations, binding settings
  7. User-Configuration Filtering: Process data plane properties to identify only user-set configurations:
    • Filter out Azure service default values that haven't been modified
    • Preserve only explicitly configured settings and customizations
    • Maintain environment-specific values and user-defined dependencies
  8. Comprehensive Analysis Summary: Compile resource configuration analysis including:
    • Control plane metadata from Azure Resource Graph
    • Data plane metadata from appropriate Azure MCP tools
    • User-configured properties only (filtered from az rest API calls)
    • Custom security and access policies
    • Non-default network and performance settings
    • Environment-specific parameters and dependencies
  9. Infrastructure Requirements Extraction: Translate analyzed resources into infrastructure requirements:
    • Resource types and configurations needed
    • Networking and security requirements
    • Dependencies between components
    • Environment-specific parameters
    • Custom policies and configurations
  10. IaC Code Generation: Call azure-iac-generator subagent to generate target format code:
    • Scenario: Generate target format IaC code based on resource analysis
    • Action: Call #runSubagent with agentName="azure-iac-generator"
    • Example payload:
      {
        "prompt": "Generate [target format] Infrastructure as Code based on the Azure resource analysis. Infrastructure requirements: [requirements from resource analysis]. Apply format-specific best practices and validation. Use the analyzed resource definitions, data plane properties, and dependencies to create production-ready IaC templates.",
        "description": "generate iac from resource analysis",
        "agentName": "azure-iac-generator"
      }
      

Read the full file on GitHub · 326 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 326 lines · 70 tokens per session scan A 4650309d9761

Subscribe to this mod's changes

azure-iac-exporter is an agent published in the GitHub repository github/awesome-copilot (38,502 stars, last pushed yesterday), licensed MIT. It adds 70 tokens to every session and 4,804 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

index

Build stateful AI agents on Cloudflare Workers. Every agent is a Durable Object — an addressable, hibernatable actor with its own SQLite database, WebSockets, and scheduling — so you can afford one durable agent per user, account, task, or conversation, with near-zero cost while idle.

cloudflare/agents · 0 tokens

sysadmin

Use for system administration, server configuration, security hardening, and infrastructure management.

AgentWorkforce/relay · 19 tokens

configuration

This guide covers everything you need to configure agents for local development and production deployment, including wrangler.jsonc setup, type generation, environment variables, and the Cloudflare dashboard.

cloudflare/agents · 0 tokens

aws-solution-architect-expert

Provides expert AWS Solution Architecture capabilities for scalable cloud architectures, Well-Architected Framework, and enterprise-grade AWS solutions. Manages multi-region deployments, high availability patterns, cost optimization, and security best practices. Use PROACTIVELY for AWS architecture design, cloud…

giuseppe-trisciuoglio/developer-kit · 70 tokens

03-Architect

Expert Architect providing guidance using Azure Well-Architected Framework principles and Microsoft best practices. Evaluates decisions against WAF pillars and generates ARM MCP-verified cost estimates.

jonathan-vella/apex-accelerator · 37 tokens

04g-Governance

Azure governance discovery agent. Queries Azure Policy assignments via REST API (incl. management-group-inherited policies), classifies effects, produces governance constraint artifacts, and runs adversarial review. Step 3.5: after Architecture, before IaC Planning.

jonathan-vella/apex-accelerator · 56 tokens