DEV Community

Raghvendra Pandey
Raghvendra Pandey

Posted on • Originally published at infrasketch.cloud

Pulumi Diagram Generator — Visualize Pulumi Infrastructure Instantly

InfraSketch now supports Pulumi. Paste your Pulumi TypeScript or Python code into the Pulumi tab and get a full architecture diagram in seconds — VPC containment, subnet grouping, resource connections, official AWS, GCP, and Azure icons. No login, no credentials, everything runs in your browser.

Try it now Paste your Pulumi TypeScript or Python code and see the diagram instantly. Open InfraSketch →

Why Pulumi needs a diagram tool

Pulumi lets you write infrastructure in real programming languages — TypeScript, Python, Go, C#. That's great for developer productivity, but it creates the same visibility problem every IaC tool has: your infrastructure lives in code, not in a picture. When a new engineer joins the team, or when you're reviewing a PR that adds a VPC and six new resources, reading TypeScript is not the fastest way to understand what gets built.

Unlike Terraform's HCL, Pulumi code doesn't have a declarative format that's easy to inspect at a glance. A function might conditionally create resources. Loops might generate dozens of similar components. The Pulumi console shows state, not topology. There's no built-in way to go from code to architecture diagram.

InfraSketch parses Pulumi TypeScript and Python directly — no compile step, no export, just paste and generate.

How to use it

Open infrasketch.cloud, click the Pulumi tab, paste your index.ts or __main__.py file, and click Generate Diagram. You can paste a partial file — InfraSketch handles incomplete code gracefully.

// Example: paste this into the Pulumi tab
import * as aws from "@pulumi/aws";

const vpc = new aws.ec2.Vpc("main", { cidrBlock: "10.0.0.0/16" });
const subnet = new aws.ec2.Subnet("public", {
vpcId: vpc.id,
cidrBlock: "10.0.1.0/24",
});
const igw = new aws.ec2.InternetGateway("igw", { vpcId: vpc.id });
const lb = new aws.lb.LoadBalancer("alb", { subnets: [subnet.id] });
Enter fullscreen mode Exit fullscreen mode

Tip: Pulumi Python uses the same resource types with underscores — aws.ec2.Vpc in TypeScript is aws.ec2.Vpc in Python too. Both work with InfraSketch.

What gets visualized

VPC containment

Resources referencing a VPC via vpcId: vpc.id are drawn inside the VPC boundary automatically.

Subnet placement

Resources with subnetId or subnets arguments are placed in public or private subnet lanes.

Connection arrows

Variable references between resources — vpc.id, cluster.endpoint — become directed arrows on the diagram.

Multi-cloud

AWS, GCP, and Azure resources in the same stack all render on one diagram with their respective provider icons.

Supported Pulumi resource types

InfraSketch supports 95+ Pulumi resource types across AWS, GCP, and Azure. Key AWS resources include:

  • Networking: aws.ec2.Vpc, aws.ec2.Subnet, aws.ec2.InternetGateway, aws.ec2.NatGateway, aws.ec2.SecurityGroup, aws.ec2.TransitGateway
  • Compute: aws.ec2.Instance, aws.ec2.LaunchTemplate, aws.autoscaling.Group, aws.ecs.Cluster, aws.ecs.Service, aws.lambda_.Function
  • Containers: aws.eks.Cluster, aws.eks.NodeGroup, aws.ecr.Repository
  • Load balancing: aws.lb.LoadBalancer, aws.lb.TargetGroup, aws.alb.LoadBalancer
  • Data: aws.rds.Instance, aws.rds.Cluster, aws.dynamodb.Table, aws.elasticache.Cluster, aws.s3.Bucket
  • Messaging: aws.sqs.Queue, aws.sns.Topic
  • DNS & CDN: aws.route53.Zone, aws.cloudfront.Distribution
  • Security: aws.iam.Role, aws.kms.Key, aws.wafv2.WebAcl

GCP resources cover Compute Engine, GKE, Cloud Run, Cloud Functions, Cloud SQL, BigQuery, Spanner, Bigtable, Pub/Sub, Cloud Storage, Secret Manager, and more. Azure covers Virtual Networks, AKS, App Service, Functions, SQL, Cosmos DB, and Key Vault.

TypeScript vs Python

InfraSketch detects the language automatically. TypeScript uses camelCase arguments (cidrBlock, vpcId). Python uses snake_case (cidr_block, vpc_id). Both parse correctly — no pre-processing needed.

# Python example — works the same way
import pulumi_aws as aws

vpc = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16")
subnet = aws.ec2.Subnet("public",
vpc_id=vpc.id,
cidr_block="10.0.1.0/24"
)
cluster = aws.eks.Cluster("eks", vpc_config=aws.eks.ClusterVpcConfigArgs(
subnet_ids=[subnet.id]
))
Enter fullscreen mode Exit fullscreen mode

Use cases

  • Code reviews — paste a PR's Pulumi code and see the topology change visually before approving
  • Onboarding — share a diagram link instead of asking new engineers to read TypeScript they've never seen
  • Documentation — export as PNG or SVG and embed in Confluence, Notion, or your wiki
  • Architecture reviews — export as draw.io XML for a fully editable diagram in your design doc
  • Multi-stack visibility — paste each stack separately and compare their architectures side by side

Pulumi vs Terraform diagrams

If you're migrating from Terraform to Pulumi (or evaluating it), InfraSketch lets you diagram both. Paste your Terraform HCL in the Terraform tab and your equivalent Pulumi code in the Pulumi tab — the diagrams should look identical if the migration is complete. Differences become immediately visible.

Generate your Pulumi diagram now Paste your index.ts or __main__.py into the Pulumi tab. Free, no login, nothing leaves your browser. Open InfraSketch →

Top comments (0)