import-infrastructure-as-code
Import existing Azure resources into Terraform using Azure CLI discovery and Azure Verified Modules (AVM). Use when asked to reverse-engineer live Azure infrastructure, generate Infrastructure as Code from existing subscriptions/resource groups/resource IDs, map dependencies, derive exact import addresses from downloaded module source, prevent configuration drift, and produce AVM-based Terraform files ready for validation and planning across any Azure resource type.
npx skills add github/awesome-copilot --skill import-infrastructure-as-code --agent copilot
Same command for any agent — swap --agent for claude-code, codex, cursor.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Import Infrastructure as Code (Azure -> Terraform with AVM) Convert existing Azure infrastructure into maintainable Terraform code using discovery data and Azure Verified Modules. ## When to Use This Skill Use this skill when the user asks to: - Import existing Azure resources into Terraform - Generate IaC from live Azure environments - Handle any Azure resource type supported by AVM (and document justified non-AVM fallbacks) - Recreate infrastructure from a subscription or resource group - Map dependencies between discovered Azure resources - Use AVM modules instead of handwritten `azurerm_*` resources ## Prerequisites - Azure CLI installed and authenticated (`az login`) - Access to the target subscription or resource group - Terraform CLI installed - Network access to Terraform Registry and AVM index sources ## Inputs | Parameter | Required | Default | Description | |---|---|---|---| | `subscription-id` | No | Active CLI context | Azure subscription used for subscription-scope discovery and context setting | | `resource-group-name` | No | None | Azure resource group used for resource-group-scope discovery | | `resource-id` | No | None | One or more Azure ARM resource IDs used f
- When to Use This Skill
- Prerequisites
- Inputs
- Step-by-Step Workflows
- 1) Collect Required Scope (Mandatory)
- 2) Authenticate and Set Context
- 3) Run Discovery Commands
- 4) Resolve Dependencies Before Code Generation
- 5) Select Azure Verified Modules (Required)
- Terraform Registry
- Official AVM Index
- Individual Module information
- 5a) Read the Module README Before Writing Any Code (Mandatory)
- 6) Generate Terraform Files
az login
az account set --subscription <subscription-id>
az account show --query "{subscriptionId:id, name:name, tenantId:tenantId}" -o json
Subscription scope
az resource list --subscription <subscription-id> -o json
Resource group scope
az resource list --resource-group <resource-group-name> -o json
Specific resource scope
az resource show --ids <resource-id-1> <resource-id-2> ... -o json
cat .terraform/modules/<module_key>/README.mdWhat does the import-infrastructure-as-code skill do?
Import existing Azure resources into Terraform using Azure CLI discovery and Azure Verified Modules (AVM). Use when asked to reverse-engineer live Azure infrastructure, generate Infrastructure as Code from existing subscriptions/resource groups/resource IDs, map dependencies, derive exact import addresses from downloaded module source, prevent configuration drift, and produce AVM-based Terraform files ready for validation and planning across any Azure resource type.
How do I install it?
Run `npx skills add github/awesome-copilot --skill import-infrastructure-as-code --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.