terraform-search-import

Discover unmanaged cloud resources and generate Terraform import blocks.

47|5|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/Cloudgeni-ai/opengeni --skill terraform-search-import-cloudgeni-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: terraform-search-import
Source: https://github.com/Cloudgeni-ai/opengeni/tree/main/packages/runtime/src/bundled_hashicorp_terraform_skills/terraform-search-import
Command: npx skills add https://github.com/Cloudgeni-ai/opengeni --skill terraform-search-import-cloudgeni-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Managing existing infrastructure in Terraform is slow and error-prone when you must discover resources manually and then write repetitive import configuration.

Core Features & Use Cases

  • Discovers unmanaged resources via Terraform Search: Uses Terraform Search list queries to enumerate matching resources for a given provider and resource type.
  • Generates bulk import configuration: Produces Terraform resource and import blocks that you can review, refine, and apply.
  • Supports auditing and migration workflows: Helps bring existing infrastructure under Terraform control for auditing, governance, and IaC migration across regions/accounts.

Quick Start

Generate an import plan by creating a .tfquery.hcl file with a list block for your target resource type, running terraform query -generate-config-out=imported.tf, then reviewing the generated resource and import blocks before running terraform plan.

Frequently Asked Questions about terraform-search-import

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

FAQPage Schema
How do I bulk import existing cloud resources into Terraform?▼

You bulk import existing cloud resources into Terraform by defining a .tfquery.hcl file with list blocks, running a query to discover matching resources, and generating resource and import blocks for review and apply.

What is the best way to migrate manually provisioned infrastructure to infrastructure as code?▼

Migrating manually provisioned infrastructure to infrastructure as code involves discovering unmanaged cloud resources via list queries and generating import-ready Terraform configuration to bring them under management.

Does Terraform bulk import work across different cloud provider schemas?▼

Yes, bulk import works across different cloud provider schemas by authenticating with the target provider and using .tfquery.hcl list blocks to discover supported resource types across regions or accounts.

How do I audit unmanaged cloud resources before importing them to Terraform state?▼

Auditing unmanaged cloud resources uses Terraform Search list queries to enumerate matching resources for a given provider and resource type, optionally applying filters and limits before generating configuration.

Do I need a specific Terraform version to generate bulk import blocks?▼

Yes, you need Terraform version 1.14 or higher to generate bulk import blocks, as the process relies on running terraform query with the -generate-config-out flag to produce the configuration.

What are the limitations of using Terraform Search for state import?▼

Limitations include requiring provider authentication and only supporting enumerated providers and resource types, meaning you must review generated resource and import blocks before running plan and apply.