import-infrastructure-as-code

Imports Azure resources into Terraform configurations using Azure CLI discovery and AVM modules.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/MoonAxis/azure-stack --skill import-infrastructure-as-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: import-infrastructure-as-code
Source: https://github.com/MoonAxis/azure-stack/tree/main/skills/import-infrastructure-as-code
Command: npx skills add https://github.com/MoonAxis/azure-stack --skill import-infrastructure-as-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill bridges the gap between existing, live Azure infrastructure and Infrastructure as Code (IaC) by converting it into Terraform configurations using Azure Verified Modules (AVM).

Core Features & Use Cases

  • Reverse-Engineering IaC: Generate Terraform code from live Azure subscriptions, resource groups, or specific resource IDs.
  • AVM Integration: Ensures generated Terraform uses official Azure Verified Modules for consistency and best practices.
  • Dependency Mapping: Identifies and maps dependencies between Azure resources for accurate IaC representation.
  • Use Case: You have a production Azure environment that was set up manually over time. Use this Skill to generate Terraform code that represents the current state, allowing for version control, easier management, and disaster recovery.

Quick Start

Use the import-infrastructure-as-code skill to import the Azure subscription with ID '12345678-1234-1234-1234-1234567890ab' into Terraform.

Frequently Asked Questions about import-infrastructure-as-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import existing Azure resources into Terraform configurations?

To import existing Azure resources into Terraform, the Skill uses Azure CLI discovery to reverse-engineer live infrastructure and generates Terraform configurations using Azure Verified Modules. It maps resource dependencies and produces valid Terraform files for planning and validation.

Can I generate Terraform code from a live Azure subscription or resource group?

Yes, you can generate Terraform code from a live Azure subscription or resource group. The Skill discovers existing Azure resources via the Azure CLI, maps their dependencies, and outputs Terraform configurations based on Azure Verified Modules for accurate IaC representation.

What are Azure Verified Modules and why use them for infrastructure as code?

Azure Verified Modules (AVM) are official, validated Terraform modules for Azure. The Skill uses AVM to ensure generated infrastructure as code follows Microsoft's best practices and consistency standards when converting live Azure resources into Terraform configurations.

Does this Terraform import process map dependencies between Azure resources?

Yes, the infrastructure as code import process maps dependencies between Azure resources. It identifies and resolves relationships across discovered Azure resources to ensure the generated Terraform configurations accurately represent the live infrastructure's architecture.

What is the best way to reverse-engineer live Azure infrastructure into IaC?

The best way to reverse-engineer live Azure infrastructure into IaC is using Azure CLI discovery combined with Azure Verified Modules. This approach maps resource dependencies and generates standardized Terraform files for version control and disaster recovery.

Do I need the Azure CLI to import infrastructure as code using Terraform?

Yes, you need the Azure CLI to import infrastructure as code. The Skill relies on Azure CLI discovery to query live Azure subscriptions and resource groups, extract resource configurations, and map dependencies for generating Terraform files.