Convert your Terraform dependency graphs into a queryable Neo4j database. Empower AI agents to understand your infrastructure context.
Get Started
Terraform GraphX is a powerful CLI tool designed to bridge the gap between static Infrastructure as Code (IaC) definitions and dynamic infrastructure analysis. By converting `terraform graph` output into a Neo4j graph database, it unlocks capabilities for structural analysis, impact assessment, and AI-driven infrastructure management.
Parses your `*.tf` or plan files
Processes DOT graph to Graph Data
Stores nodes & relationships
Context for AI Agents
Traditional `terraform graph` outputs generic DOT files that are hard to query. GraphX transforms this directly into a labeled property graph where you can ask complex questions like:
MATCH (dependent)-[*]->(target {id: 'aws_vpc.main'}) RETURN dependent
Built-in Docker integration means you don't need to manually set up a database. GraphX handles the Neo4j container lifecycle for you.
Run updates as many times as you want. The graph is intelligently updated via Cypher transactions, preventing duplicate nodes or edges.
Designed to feed context to AI agents via the Model Context Protocol. Give your LLMs "sight" over your infrastructure dependencies.
Auto-generates strong passwords and manages local permissioning. Database volumes are kept local to your project.
Don't just graph what you haveβgraph what you will have. Pass Terraform plan binary files to preview changes.
Written in Go for cross-platform portability and high performance on heavy infrastructure graphs.
To let your AI assistants (like Claude, Cursor, or Ollama) query your infrastructure graph, we recommend using the Official Neo4j MCP Server.
It provides a standardized way for LLMs to execute Cypher queries against your GraphX database, enabling them to answer questions like "What depends on this VPC?" or "Are there circular dependencies?".
Configure the MCP server to connect to your GraphX instance at bolt://localhost:7687 using the credentials generated by terraform-graphx init.
Initialize the project config. This creates a `.terraform-graphx.yaml` and a secure password.
terraform-graphx init
Spin up the local Neo4j container. Data is persisted in `./neo4j-data`.
terraform-graphx start
This runs `terraform graph`, parses it, and pushes it to Neo4j.
terraform-graphx update
Or analyze a specific plan:
terraform-graphx update --plan=tfplan.binary
Check connectivity and open your browser to localhost:7474 to see your graph.
terraform-graphx check
Free up resources when you are done.
terraform-graphx stop