Agent skill · Audited from source
terraform-search-import
skill · hashicorp/agent-skillsMPL-2.0 licenceAudited 29 Oct 2026 · source 95ee42f9a36f
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 95ee42f9a36f and found no filesystem, network or shell access and no hard-coded secrets. What it does: Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating…
Cite
Cite this page
ModelsAtlas. “terraform-search-import (hashicorp/agent-skills)”. Retrieved 29 Oct 2026. https://modelsatlas.com/skills/hashicorp/terraform-search-import
Trust audit
Audit 0.4.1 · source read 29 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 13,985 of 14,816 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 95ee42f9a36f · 29 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherhashicorp GitHub organizationOwner of the repository this skill is read from
- Source folderhashicorp/agent-skills/plugins/terraform/skills/terraform-search-importThe exact folder we audited
- LicenceMPL-2.0As the repository states it
- Commit pinned for this verdict95ee42f9a36fA new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating…
---
name: terraform-search-import
description: Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating to IaC.
metadata:
lifecycle-status: active
copyright: Copyright IBM Corp. 2026
version: "0.1.0"
compatibility: Requires Terraform 1.14 or newer and providers with list resource support
---
# Terraform Search and Bulk Import
Discover existing cloud resources using declarative queries and generate configuration for bulk import into Terraform state.
**References:**
- [Terraform Search - list block](https://developer.hashicorp.com/terraform/language/block/tfquery/list)
- [Bulk Import](https://developer.hashicorp.com/terraform/language/import/bulk)
## 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:**
```bash
# Check what list resources are available
./scripts/list_resources.sh aws # Specific provider
./scripts/list_resources.sh # All configured providers
```
## Decision Tree
1. **Identify target resource type** (e.g., aws_s3_bucket, aws_instance)
2. **Check if supported**: Run `./scripts/list_resources.sh <provider>`
3. **Choose workflow**:
- ** If supported**: Check for terraform version available.
- ** If terraform version is above 1.14.0** Use Terraform Search workflow (below)
- ** If not supported or terraform version is below 1.14.0 **: Use Manual Discovery workflow (see [references/MANUAL-IMPORT.md](references/MANUAL-IMPORT.md))
**Note**: The list of supported resources is rapidly expanding. Always verify current support before using manual import.
## Prerequisites
Before writing queries, verify the provider supports list resources for your target resource type.
### Discover Available List Resources
Run the helper script to extract supported list resources from your provider:
```bash
# From a directory with provider configuration (runs terraform init if needed)
./scripts/list_resources.sh aws # Specific provider
./scripts/list_resources.sh # All configured providers
```
Or manually query the provider schema:
```bash
terraform providers schema -json | jq '.provider_schemas | to_entries | map({key: (.key | split("/")[-1]), value: (.value.list_resource_schemas // {} | keys)})'
```
Terraform Search requires an initialized working directory. Ensure you have a configuration with the required provider before running queries:
```hcl
# terraform.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.0"
}
}
}
```
Run `terraform init` to download the provider, then proceed with queries.
## Terraform Search Workflow (Supported Resources Only)
1. Create `.tfquery.hcl` files with `list` blocks defining search queries
2. Run `terraform query` to discover matching resources
3. Generate configuration with `-generate-config-out=<file>`
4. Review and refine generated `resource` and `import` blocks
5. Run `terraform plan` and `terraform apply` to import
## Query File Structure
Query files use `.tfquery.hcl` extension and support:
- `provider` blocks for authentication
- `list` blocks for resource discovery
- `variable` and `locals` blocks for parameterization
```hcl
# discovery.tfquery.hcl
provider "aws" {
region = "us-west-2"
}
list "aws_instance" "all" {
provider = aws
}
```
## List Block Syntax
```hcl
list "<list_type>" "<symbolic_name>" {
provider = <provider_reference> # Required
# Optional: filter configuration (provider-specific)
# The `config` block schema is provider-specific. Discover available options using `terraform providers schema -json | jq '.provider_schemas."registry.terraform.io/hashicorp/<provider>".list_resource_schemas."<resource_type>"'`
config {
filter {
name = "<filter_name>"
values = ["<value1>", "<value2>"]
}
region = "<region>" # AWS-specific
}
# Optional: limit results
limit = 100
}
```
## Supported List Resources
Provider support for list resources varies by version. **Always check what's available for your specific provider version using the discovery script.**
## Query Examples
### Basic Discovery
```hcl
# Find all EC2 instances in configured region
list "aws_instance" "all" {
provider = aws
}
```
### Filtered Discovery
```hcl
# Find instances by tag
list "aws_instance" "production" {
provider = aws
config {
filter {
name = "tag:Environment"
values = ["production"]
}
}
}
# Find instances by type
list "aws_instance" "large" {
provider = aws
config {
filter {
name = "instance-type"
values = ["t3.large", "t3.xlarge"]
}
}
}
```
### Multi-Region Discovery
```hcl
provider "aws" {
region = "us-west-2"
}
locals {
regions = ["us-west-2", "us-east-1", "eu-west-1"]
}
list "aws_instance" "all_regions" {
for_each = toset(local.regions)
provider = aws
config {
region = each.value
}
}
```
### Parameterized Queries
```hcl
variable "target_environment" {
type = string
default = "staging"
}
list "aws_instance" "by_env" {
provider = aws
config {
filter {
name = "tag:Environment"
values = [var.target_environment]
}
}
}
```
## Running Queries
```bash
# Execute queries and display results
terraform query
# Generate configuration file
terraform query -generate-config-out=imported.tf
# Pass variables
terraform query -var='target_environment=production'
```
## Query Output Format
```
list.aws_instance.all account_id=123456789012,id=i-0abc123,region=us-west-2 web-server
```
Columns: `<query_address> <identity_attributes> <name_tag>`
## Generated CoExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 95ee42f
git clone https://github.com/hashicorp/agent-skills git -C agent-skills checkout 95ee42f9a36f
The author documents no install command, so this uses the repository directly. Our verdict covers commit 95ee42f9a36f only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
95ee42f9a36f
Similar skills
All devops & cloud skills →hashicorp/agent-skills
Implement Terraform Provider resources and data sources using the Plugin Framework: CRUD operations, schema design, plan modifiers and validators, not-found handling, waiters for eventually consistent APIs, import…
hashicorp/agent-skills
Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase/TestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations,…
hashicorp/agent-skills
Push Packer build metadata to HCP Packer registry for tracking and managing image lifecycle. Use when integrating Packer builds with HCP Packer for version control and governance.
hashicorp/agent-skills
Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices.
hashicorp/agent-skills
Create, update, and review Terraform provider documentation for Terraform Registry using HashiCorp-recommended patterns, tfplugindocs templates, and schema descriptions. Use when adding or changing provider…
hashicorp/agent-skills
Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix `TestAcc`, when a test fails with missing environment variables, or when…
Questions about terraform-search-import
What does the terraform-search-import skill do?
Is terraform-search-import safe to install?
What can terraform-search-import access on my machine?
How current is this page?
Sources
- github.com/hashicorp/agent-skills/tree/main/plugins/terraform/sk — the audited source at commit 95ee42f9a36f and every finding aboveObserved · 29 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the terraform-search-import skill do?
- Is terraform-search-import safe to install?
- What can terraform-search-import access on my machine?