
Terraform Import Generator
by kishaningithub
Automates the generation of Terraform import statements to simplify state migrations between code bases.
What it does
Provides a utility to generate precise import blocks for Terraform resources. By analyzing the output of terraform show -json, it creates the necessary statements to bring existing infrastructure into a new Terraform state file, significantly reducing manual effort during migrations.
Tools
generate_imports: Parses Terraform JSON state and outputs import blocks for specified modules or resources.filter_by_module: Generates import statements specifically for a chosen module path.full_state_import: Generates import statements for every resource found in the provided state JSON.
Installation
Since this is a Go binary, it can be run via Docker or installed via Homebrew. To use as an MCP server, you would typically wrap the binary execution:
{
"mcpServers": {
"tf-import-gen": {
"command": "docker",
"args": ["run", "-i", "ghcr.io/kishaningithub/tf-import-gen:latest"]
}
}
}
Supported hosts
- Claude
Quick install
brew install kishaningithub/tap/tf-import-genInformation
- Pricing
- free
- Published
- 5/1/2026
- stars






