
Description
import-infrastructure-as-code is an agent skill from the github/awesome-copilot collection for converting existing Azure infrastructure into maintainable Terraform code. It reverse-engineers a live Azure environment: it uses Azure CLI discovery to find the resources in a subscription or resource group, maps the dependencies between them, and writes Terraform that uses Azure Verified Modules (AVM) rather than handwritten resource blocks wherever a module exists for the resource type. Where no verified module fits, the skill documents the reason for falling back to a direct resource. The result is infrastructure code that can be reviewed, versioned and reapplied, which is the usual goal when a team inherits resources that were created by hand in the portal. The skill applies when importing existing Azure resources into Terraform, generating infrastructure code from a live environment, recreating infrastructure from a subscription or resource group, and mapping dependencies between discovered resources. It is useful for platform teams bringing unmanaged environments under code management. Importing state is delicate: a wrong import can make Terraform plan to recreate resources, so the plan should be reviewed carefully before any apply, and state should be stored securely. The skill is installed with the skills CLI from the github/awesome-copilot repository. Its skills.sh page showed about 6.9K installs, with Gen Agent Trust Hub and Socket passing and Snyk showing a warning at the time of the scan.…
Highlights
- Discovers live Azure resources with Azure CLI
- Maps dependencies between resources
- Terraform using Azure Verified Modules
- Documents justified non-AVM fallbacks
- Installs with the skills CLI
Ratings & Reviews
No ratings yet
Be the first to rate import-infrastructure-as-code.
People also visit

terraform-engineer
Implementing infrastructure as code with Terraform across AWS, Azure, or GCP

az-cost-optimize
Analyze Azure resources and IaC files to identify cost optimizations

terraform-azurerm-set-diff-analyzer
Identify false-positive diffs in Terraform AzureRM plans caused

update-avm-modules-in-bicep
Automated Azure Verified Module version updates for Bicep files
import-infrastructure-as-code FAQ
What does it turn into code?
Live Azure resources into Terraform, using Azure Verified Modules where they exist.
How are resources found?
Through Azure CLI discovery across a subscription or resource group, with their dependencies mapped.
What is the risk of importing?
A wrong import can make Terraform plan to recreate resources, so review every plan carefully before applying.
How do I install it?
Run npx skills add https://github.com/github/awesome-copilot --skill import-infrastructure-as-code.
What security audits does it have?
skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Warn. A Warn or Fail is worth reading before you install.
What are the best import-infrastructure-as-code alternatives?
Popular alternatives to import-infrastructure-as-code include terraform-engineer, az-cost-optimize and terraform-azurerm-set-diff-analyzer. See all import-infrastructure-as-code alternatives

