terraform-search-import
Skill3 starsChanged 8 months agoMITArchived repositoryView on GitHub
Discover existing Azure resources and bulk import them into Terraform management. USE FOR: import Azure resources, bring unmanaged infra under Terraform, audit Azure resources, migrate to IaC, terraform import, bulk import. WHEN: import existing resources, discover Azure infrastructure, adopt Terraform for existing resources, generate import blocks. DO NOT USE FOR: Bicep code, new resource creation, architecture decisions.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- hashicorp/agent-skillstheir own version, first seen Aug 10, 2026
- jenreh/appkittheir own version, first seen Jul 8, 2026
- danielvogler/ai-skills-librarytheir own version, first seen Jun 3, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- hashicorp/agent-skills★ 883same name
- jenreh/appkit★ 4same name
- danielvogler/ai-skills-library★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- appinsights-instrumentationSkill
- azure-adrSkill
- azure-aigatewaySkill
- azure-aiSkill
- azure-artifactsSkill
- azure-bicep-patternsSkill
- azure-cloud-migrateSkill
- azure-complianceSkill
- azure-computeSkill
- azure-cost-optimizationSkill
- azure-defaultsSkill
- azure-deploySkill
- azure-diagnosticsSkill
- azure-diagramsSkill
- azure-hosted-copilot-sdkSkill
- azure-kustoSkill
- azure-messagingSkill
- azure-prepareSkill
- azure-quotasSkill
- azure-rbacSkill
- azure-resource-lookupSkill
- azure-resource-visualizerSkill
- azure-storageSkill
- azure-validateSkill
- context-optimizerSkill
- context-shreddingSkill
- copilot-customizationSkill
- count-registrySkill
- docs-writerSkill
- drawioSkill
- entra-app-registrationSkill
- excalidrawSkill
- github-operationsSkill
- golden-principlesSkill
- iac-commonSkill
- make-skill-templateSkill
- mermaidSkill
- microsoft-code-referenceSkill
- microsoft-docsSkill
- microsoft-foundrySkill
- microsoft-skill-creatorSkill
- python-diagramsSkill
- session-resumeSkill
- terraform-patternsSkill
- terraform-testSkill
- workflow-engineSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 50
Use type-specific commands: az vm list, az network vnet list, az storage account list, etc.
- Very specific: line 77
Import ID format: /subscriptions/{sub}/resourceGroups/{rg}/providers/{type}/{name}
- Very specific: line 81
After importing raw azurerm_* resources, refactor to AVM modules using moved {} blocks.
- Distinctive: line 86
Use Terraform MCP tools during import workflows:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Terraform Search & Import for Azure
Discover existing Azure resources and generate Terraform configuration for bulk import.
References:
- Terraform Import
- Terraform Search (TF 1.14+)
Decision Tree
┌─ Identify target Azure resources
│
├─ PRIMARY: Manual Discovery via az CLI (always works)
│ └─ az resource list → create import blocks → terraform plan → apply
│
└─ SECONDARY: Terraform Search (EXPERIMENTAL)
├─ Check: terraform version >= 1.14?
│ └─ NO → use Manual workflow
├─ Check: azurerm supports list_resource_schemas for this type?
│ └─ UNKNOWN/NO → use Manual workflow
└─ YES to both → use Search workflowPrimary workflow = Manual Discovery via az CLI. Always works with azurerm ~> 4.0.
Search workflow is experimental — azurerm provider support for list_resource_schemas
is TBD. Use Manual Discovery as the reliable default.
Manual Discovery Workflow (Primary)
Step 1: Discover Resources with az CLI
az resource list --resource-group rg-contoso-prod --output table
az resource list --tag Environment=prod --output jsonUse type-specific commands: az vm list, az network vnet list, az storage account list, etc.
Step 2: Create Import Blocks
For each resource, create a resource block + import block. See references/manual-import.md
for full examples and bulk import scripts.
Step 3: Plan and Apply
terraform plan # Review — should show import actions only
terraform apply # Execute importsAzure Resource Type ↔ Terraform Mapping
| Azure Type | Terraform Resource | az CLI |
Microsoft.Resources/resourceGroups | azurerm_resource_group | az group list |
Microsoft.Network/virtualNetworks | azurerm_virtual_network | az network vnet list |
Microsoft.Compute/virtualMachines | azurerm_linux_virtual_machine | az vm list |
Microsoft.Storage/storageAccounts | azurerm_storage_account | az storage account list |
Microsoft.KeyVault/vaults | azurerm_key_vault | az keyvault list |
Microsoft.Sql/servers | azurerm_mssql_server | az sql server list |
Microsoft.Web/sites | azurerm_linux_web_app | az webapp list |
Microsoft.App/containerApps | azurerm_container_app | az containerapp list |
Import ID format: /subscriptions/{sub}/resourceGroups/{rg}/providers/{type}/{name}
Post-Import: Adopt AVM Modules
After importing raw azurerm_* resources, refactor to AVM modules using moved {} blocks.
See terraform-patterns skill references/refactor-module.md for guidance.
Integration with Terraform MCP
Use Terraform MCP tools during import workflows:
| Tool | Purpose |
mcp_terraform_search_providers | Validate resource type support in provider |
mcp_terraform_get_provider_details | Get resource schemas and import ID format |
mcp_terraform_search_modules | Find AVM modules for post-import refactoring |
mcp_terraform_get_latest_module_version | Get latest AVM module version |
Terraform Search Workflow (Experimental)
Warning: Requires Terraform >= 1.14 and
azurermprovider support forlist_resource_schemas(TBD). Use Manual Discovery above as primary path.
Uses .tfquery.hcl files with list blocks to discover resources, then
terraform query -generate-config-out=imported.tf to generate config.
Clean generated output by removing computed attrs, adding variables, applying CAF naming.
Reference Index
| File | Contents |
references/manual-import.md | Detailed az CLI discovery, bulk import scripts, resource mapping |
scripts/list_resources.sh | Extract supported list resources from providers |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

