This automates the tedious process of bringing existing cloud infrastructure under Terraform management using the new Terraform Search feature. Instead of manually writing import blocks for dozens of resources, you write declarative queries in .tfquery.hcl files to discover resources by filters like tags or regions, then bulk generate both the resource configurations and import blocks. The workflow is straightforward: check if your resource type supports list operations (there's a script for that), write your query, run terraform query with the generate flag, clean up the output, and apply. One catch worth knowing upfront: this requires Terraform 1.14+ and provider support is still expanding, so you'll need to verify your specific resource types are covered before diving in.
npx skills add https://github.com/hashicorp/agent-skills --skill terraform-search-import