Skip to main content
skill CX Codex

terraform-search-import — Claude Code skill: how to install

Discovers untracked cloud assets and sets up Terraform configuration for bulk state imports. Helpful during infrastructure migrations and audits.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hashicorp/agent-skills --skill terraform-search-import -a claude-code
Open on GitHub

What terraform-search-import does

This skill guides assistants through searching active cloud services and turning them into Terraform configurations. It drafts .tfquery.hcl files using list blocks, executes terraform query, and extracts resource declarations alongside import definitions.

The process relies on ./scripts/list_resources.sh to check what the target provider actually supports before running searches. It handles variable filtering and passes output through the -generate-config-out flag.

Your workspace must run Terraform 1.14 or newer with compatible provider schemas. Once files are generated, computed attributes like generated IDs must still be trimmed manually.

What it helps with

  • locate untracked cloud assets without clicking web consoles
  • draft configuration files for discovered virtual instances
  • inspect provider schemas for query block compatibility
  • bring unmanaged infrastructure into state via batch import

Example prompts for the agent

  • Search for all active EC2 instances in us-west-2 using a .tfquery.hcl list block
  • Run ./scripts/list_resources.sh aws to verify if S3 buckets support search queries
  • Execute terraform query -generate-config-out=imported.tf and strip out read-only attributes

How to install terraform-search-import

1Skills CLI (Vercel)

npx skills add hashicorp/agent-skills --skill terraform-search-import -a claude-code

2Manually: put the files in place

~/.claude/skills/terraform-search-import/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/terraform-search-import/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about terraform-search-import

How to install terraform-search-import in Claude Code?

Run npx skills add hashicorp/agent-skills --skill terraform-search-import -a claude-code. The tool adds the skill directly to your Claude Code workspace.

What does terraform-search-import do?

It automates infrastructure discovery using declarative search queries. The agent builds import statements and resource blocks to place existing components under IaC control.

What are the version requirements for this skill?

You need Terraform 1.14 or higher and an initialized provider that supports list resources. Earlier releases lack the query and schema capabilities needed for discovery.

Similar skills

Everything for DevOps and infrastructure →

From the same set16

terraform-style-guide A skill that generates and validates Terraform code according to HashiCorp's official standards. Ensures consistent, secure, and readable HCL across your configurations. CX Codex +1 12,600installs terraform-test Guides an agent through Terraform test files, scenarios, assertions, and plan or apply runs. Use it when checking modules, resources, and outputs. CX Codex +1 8,800installs refactor-module This skill turns a monolithic Terraform configuration into reusable modules with clear variables and outputs. Useful when one main.tf has grown too risky to touch. CX Codex +1 6,400installs terraform-stacks Guides AI coding assistants through HashiCorp Terraform Stacks syntax, component definitions, and multi-environment deployment configs. CX Codex +1 5,600installs provider-resources This skill guides Terraform resource and data source work with the Plugin Framework. Use it when adding resources, handling drift, or reviewing provider code. CX Codex +1 4,100installs provider-actions Guides implementation of Terraform Actions with the Plugin Framework for operations run around resource create, update, and destroy events. CX Codex +1 3,900installs new-terraform-provider A skill that walks the agent through bootstrapping a Terraform provider on the Plugin Framework, from directory layout to a passing build. CX Codex +1 3,900installs run-acceptance-tests Runs and investigates Terraform provider acceptance tests with the TestAcc prefix. Use it for missing environment variables, failed runs, or tests that pass when they should not. CX Codex +1 3,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor