- Home
- Skills
- DevOps & Cloud
- Terraform and Kubernetes Infrastructure Diagram Generator
Works with the AI Agents you already use
Terraform and Kubernetes Infrastructure Diagram Generator
Draw your real cloud topology from Terraform, Helm, Kustomize or CDK as Mermaid, every node traced to file:line, with public exposure findings and a MAPPED, PARTIAL or EXPOSED verdict.
$7
Terraform and Kubernetes Infrastructure Diagram Generator
Example session with this skill installed
Diagram our payments-infra repo (Terraform in envs/dev and envs/prod, Helm charts under charts/). Only the ALB on 443 is supposed to be public. Show me what is actually exposed and how dev differs from prod.
- Read your context and instructions
- Compiled the terraform and kubernetes
Infrastructure diagrams - payments-infra @ 7b3e91d (dev, prod)
Verdict: EXPOSED Sources: Terraform, Helm Plan JSON: no
Defaults used: intended public = ALB on 443 only Render test: passed 4/4 (mmdc)
Exposure findings
| # | Severity | Resource | Env | Why public | Evidence | Fix |
|---|---|---|---|---|---|---|
| 1 | CRITICAL | module.data.aws_security_group_rule.db_ingress | dev | 5432 open to 0.0.0.0/0 | envs/dev/terraform.tfvars:14 -> modules/data/sg.tf:22 | set db_allowed_cidrs to the app subnet CIDRs |
| 2 | HIGH | Service grafana (monitoring) | prod | type: LoadBalancer, no loadBalancerSourceRanges | charts/monitoring/values-prod.yaml:31, rendered/monitoring/templates/service.yaml:9 | use ClusterIP + existing ingress, or add source ranges |
| 3 | INFO | module.edge.aws_lb.public | all | internet-facing ALB, 443 | modules/edge/main.tf:12 | intended |
Network view (prod)
flowchart TB
internet{{Internet}}
subgraph vpc["vpc main (prod)"]
subgraph pub["public subnets x2"]
alb[public<br/>aws_lb ALB]
glb[grafana<br/>Service LoadBalancer]
end
subgraph priv["private subnets x2"]
eks[eks main<br/>node group x3]
db[(payments<br/>aws_db_instance)]
end
end
internet ==>|443| alb
internet ==>|3000| glb
alb -->|8080| eks
eks -->|5432| db
classDef exposed stroke:#d00,stroke-width:3px
class glb exposed
Environment differences
| Resource | dev | prod | Evidence |
|---|---|---|---|
| node group size | 1 | 3 | envs/*/terraform.tfvars:6 |
| RDS multi_az | false | true | envs/*/terraform.tfvars:11 |
| db_allowed_cidrs | 0.0.0.0/0 | app subnets | envs/*/terraform.tfvars:14 |
Unconfirmed (not drawn)
module.waf- registry source, not in .terraform/modules - runterraform init -backend=false(needs your yes)aws_route53_record.alias- for_each overvar.extra_domains, no value in any tfvars
Next steps
- Wrote docs/infrastructure/01-04, exposure.md, evidence.md; last verified 7b3e91d
- Fix findings 1 and 2, then rerun the exposure check
Connects securely to your tools. The creator never sees your data.
About this skill
Infrastructure diagrams are usually hand-drawn once and wrong by the next sprint. An AI asked to draw your cloud from scratch will happily add subnets, NAT gateways or regions that your code never declares. This skill reads the infrastructure-as-code itself and requires a file and line for every boundary, resource and connection.
What it does:
- Inventories Terraform/OpenTofu roots, modules and tfvars, Kubernetes manifests, Helm charts, Kustomize overlays, CloudFormation/CDK output, Pulumi programs and docker-compose files
- Renders locally where possible (helm template, kubectl kustomize, cdk synth with lookups off) and uses terraform show -json plan output if you provide it
- Resolves resources through module sources, count and for_each, and lists anything it cannot resolve as Unconfirmed instead of drawing it
- Draws four Mermaid views: network topology (account, region, VPC, public and private subnets), Kubernetes, data stores and secrets, and per-environment differences. D2 or architecture-beta on request
- Flags internet-facing resources (IGW routes, 0.0.0.0/0 rules, public buckets and databases, LoadBalancer services, public cluster endpoints) as findings with severity
- Applies size rules, a legend on every diagram, a docs/infrastructure/ file layout and a drift check against a later commit or plan JSON
- Ends with a verdict of MAPPED, PARTIAL or EXPOSED
Who it's for: platform and DevOps engineers, SREs, security reviewers and tech leads who need an accurate infrastructure picture for onboarding, audits or design reviews.
Honesty note: the skill is read-only and never needs cloud credentials. It does not run apply, plan or destroy, and it runs terraform init only if you say yes. It shows what the code declares, not what is live in your account, so resources created in the console are not shown.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.
Diagrams show what the infrastructure code (and any plan JSON you supply) declares at one commit, not what is live in the cloud account. Console-created resources, live drift and the contents of remote modules that have not been downloaded are not visible. Values that depend on data sources, remote state or cluster lookups are listed as Unconfirmed. Mermaid architecture-beta icon packs do not work on GitHub or GitLab.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 29 days ago
- Software
- @mermaid-js/mermaid-cli
Git
- Optional
- HelmorkubectlorCDKmermaid-cli
Node.js
These render charts and stacks locally (kubectl with kustomize). mermaid-cli runs on Node.js to test-render diagrams. No cloud credentials are needed.