
Generate OCI Architecture Diagrams from Terraform with One Claude Code Command
The problem Manually drawing OCI diagrams in draw.io is tedious... What I built https://github.com/sergio-farfan/OCI-draw.io-Architect A Claude Code plugin — type /drawio-architect in any project... How it works The plugin accepts three input types: a Terraform directory path — parsed to extract VCNs, subnets, gateways, and DRG attachments — a VCN name resolved against existing .tfvars files, or a plain-text description of the target architecture. From any of these inputs, it computes a pixel-precise grid layout, calculating container bounding boxes to eliminate element overlap, and generates a Python script leveraging a custom DrawioBuilder class backed by 220 bundled OCI SVG icons. Executing the script produces a .drawio file fully styled with Oracle's official color palette. The entire workflow is invoked within Claude Code via a single /drawio-architect command. Quick start Prerequisites Claude Code (CLI) installed and working Python 3.8+ draw.io desktop for viewing generated .draw
Continue reading on Dev.to DevOps
Opens in a new tab



