terraform-search-import
- Repo stars 0
- Author updated Live
- Author repo skills-registry
- Domain
- DevOps
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @tomevault-io · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: terraform-search-import
description: **WORKFLOW SKILL** — Discover existing Azure resources and bulk import them into Terraform manag…
category: devops
runtime: no special runtime
---
# terraform-search-import output preview
## PART A: Task fit
- Use case: **WORKFLOW SKILL** — Discover existing Azure resources and bulk import them into Terraform management. WHEN: "terraform import", "import Azure resources", "bring unmanaged infra under Terraform", "adopt Terraform for existing resources", "generate import blocks". DO NOT USE FOR: Bicep code (azure-bicep-patterns), new resource creation (terraform-patterns), architecture decisions (azure-adr). Use when this capability is needed..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Decision Tree / Rules / Manual Discovery Workflow (Primary)” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “**WORKFLOW SKILL** — Discover existing Azure resources and bulk import them into Terraform management. WHEN: "terraform import", "import Azure resources", "bring unmanaged infra under Terraform", "adopt Terraform for existing resources", "generate import blocks". DO NOT USE FOR: Bicep code (azure-bicep-patterns), new resource creation (terraform-patterns), architecture decisions (azure-adr). Use when this capability is needed.”.
- **02** When the source has headings, the agent prioritizes “Decision Tree / Rules / Manual Discovery Workflow (Primary)” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source mentions slash commands such as `/subscriptions`; use them first when your agent supports command triggers.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Decision Tree / Rules / Manual Discovery Workflow (Primary)”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: terraform-search-import
description: **WORKFLOW SKILL** — Discover existing Azure resources and bulk import them into Terraform manag…
category: devops
source: tomevault-io/skills-registry
---
# terraform-search-import
## When to use
- **WORKFLOW SKILL** — Discover existing Azure resources and bulk import them into Terraform management. WHEN: "terrafor…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Decision Tree / Rules / Manual Discovery Workflow (Primary)” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "terraform-search-import" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Decision Tree / Rules / Manual Discovery Workflow (Primary)
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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 workflow
Primary 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.
Rules
- Manual Discovery is the primary path — always works with
azurerm ~> 4.0and Azure CLI; Terraform Search is experimental and provider support is TBD - Pin provider to
~> 4.0— azurerm 4.x renamed many attributes (allow_blob_public_access→allow_nested_items_to_be_public, etc.); pinning to anything else causes drift after import - Plan before apply — always run
terraform planafter generating import blocks; the plan should show import actions ONLY (no creates / destroys) - Adopt AVM modules post-import — raw
azurerm_*is acceptable as a temporary state; refactor toAzure/avm-res-*modules withmoved {}blocks (seeterraform-patternsreferences/refactor-module.md) - Document the source — in the imported
resourceblock, comment the originatingaz resource listquery so future runs can be reproduced - Out of scope: Bicep code (use
azure-bicep-patterns), new resource creation (useterraform-patterns), architecture decisions (useazure-adr)
Manual Discovery Workflow (Primary)
Three-step procedure: (1) discover existing resources via az resource list (by resource
group, tag, or type-specific commands like az vm list); (2) generate resource + import
blocks for each (full examples and bulk import scripts in
references/manual-import.md); (3) terraform plan (review:
imports only — no creates / destroys) → terraform apply.
Import ID format:
/subscriptions/{sub}/resourceGroups/{rg}/providers/{type}/{name}. The Azure-type ↔
Terraform-resource ↔ az CLI mapping table for the 8 most common services lives in
references/manual-import.md.
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 |
Source: aivandelindt/azure-agentic-infraops — distributed by TomeVault.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review