hashicorp avatar

Terraform Search Import

Discovers existing cloud resources via Terraform Search queries and bulk imports them into state.

CCM score
73 of 100
skills.sh installs
5.2K
GitHub stars
941
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the discovery-to-import workflow: .tfquery.hcl list blocks, terraform query, generated config, then plan and apply
  • Includes a helper script, scripts/list_resources.sh, that lists supported list resources for each provider
  • Supports filtered, multi-region, and parameterized queries, with generated configuration written via -generate-config-out
  • Requires Terraform 1.14 or newer and providers with list resource support; falls back to manual discovery otherwise

Install

$ npx -y skills add hashicorp/agent-skills --skill terraform-search-import -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Terraform Search and Bulk Import

Discover existing cloud resources using declarative queries and generate configuration for bulk import into Terraform state.

References:

When to Use

  • Bringing unmanaged resources under Terraform control
  • Auditing existing cloud infrastructure
  • Migrating from manual provisioning to IaC
  • Discovering resources across multiple regions/accounts

IMPORTANT: Check Provider Support First

BEFORE starting, you MUST verify the target resource type is supported:

# Check what list resources are available
./scripts/list_resources.sh aws      # Specific provider
./scripts/list_resources.sh          # All configured providers

Decision Tree

Details

Repository
github.com/hashicorp/agent-skills
Category
DevOps & Cloud
First seen
Apr 16, 2026

More from hashicorp/agent-skills

All 16

Similar to Terraform Search Import

More DevOps & Cloud