Agent skill · DevOps & Cloud

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.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
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.

Facts
Files in the skill folder: 1
SKILL.md size: 18 KB
Bundled scripts: none
Path: skills/import-infrastructure-as-code/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Prerequisites
  3. Inputs
  4. Step-by-Step Workflows
  5. 1) Collect Required Scope (Mandatory)
  6. 2) Authenticate and Set Context
  7. 3) Run Discovery Commands
  8. 4) Resolve Dependencies Before Code Generation
  9. 5) Select Azure Verified Modules (Required)
  10. Terraform Registry
  11. Official AVM Index
  12. Individual Module information
  13. 5a) Read the Module README Before Writing Any Code (Mandatory)
  14. 6) Generate Terraform Files
Commands it runs
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.md
More from awesome-copilot
All skills →
About this skill
What 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.

Keep going