terraform-search-import

Discover cloud resources and generate Terraform import blocks.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/kk0ga/terraform-aws-learning --skill terraform-search-import-kk0ga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-search-import
Source: https://github.com/kk0ga/terraform-aws-learning/tree/main/.agents/skills/terraform-search-import
Command: npx skills add https://github.com/kk0ga/terraform-aws-learning --skill terraform-search-import-kk0ga

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires terraform, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the challenge of bringing existing, unmanaged cloud infrastructure under Terraform management by automating the discovery and configuration generation process.

Core Features & Use Cases

  • Automated Discovery: Uses declarative queries to identify existing cloud resources across regions and accounts.
  • Bulk Import Generation: Automatically creates Terraform resource and import blocks, significantly reducing manual coding effort.
  • Use Case: When migrating a legacy AWS environment to Infrastructure as Code, use this Skill to scan for existing EC2 instances and S3 buckets, then generate the necessary import configuration to bring them into your Terraform state.

Quick Start

Use the terraform-search-import skill to discover all existing AWS S3 buckets in the current region and generate the corresponding import configuration.

Frequently Asked Questions about terraform-search-import

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

FAQPage Schema
How do I import existing AWS resources into Terraform state files?

To import existing AWS resources into Terraform, you can automate discovery and bulk import using declarative queries to generate resource and import blocks. This scans existing infrastructure across cloud regions and accounts to bring unmanaged resources under declarative control.

Can I bulk import cloud infrastructure into Terraform without manual coding?

Yes, you can bulk import cloud infrastructure into Terraform without manual coding by automating the discovery and configuration generation process. This approach automatically creates Terraform resource and import blocks, significantly reducing the manual effort required for infrastructure migration.

What's the best way to migrate legacy AWS environments to Infrastructure as Code?

The best way to migrate legacy AWS environments to Infrastructure as Code is to automate the discovery of existing resources like EC2 instances and S3 buckets. This generates the necessary import configuration to bring unmanaged resources into Terraform state.

Do I need specific Terraform versions to discover and import existing cloud resources?

Yes, discovering and importing existing cloud resources requires Terraform 1.14+ and provider-specific list resource support. These dependencies are necessary to execute the declarative queries and generate the required configuration for your infrastructure.

Does terraform-search-import work with jq for cloud migration auditing?

Yes, terraform-search-import works with jq for cloud migration auditing alongside Terraform 1.14+. It uses these dependencies to execute queries and generate configuration, applying declarative queries to identify existing cloud resources across regions.

What are the limitations of using declarative queries for Terraform import generation?

A key limitation of using declarative queries for Terraform import generation is the strict dependency on provider-specific list resource support. Without this provider capability, the automated discovery and bulk import of existing cloud infrastructure cannot execute queries or generate configurations.