Skip to main content

export the metadata from existing tools, and generate the diagrams

Project description

diagrams-exporters

  • in additional to the design phase, diagrams can aslo be used for analysis and monitoring the current architecture.
  • to do that, we need to export the 'metadata' from other sources, e.g. terraform, aws cli, etc. then generate the diagrams.

diagrams-exporters export the metadata from existing tools, and generate the diagrams.

Features

:rocket: terraform graph

https://github.com/hashicorp/learn-terraform-no-code-provisioning

https://github.com/hashicorp/learn-terraform-provision-eks-cluster

https://github.com/hashicorp/learn-terraform-multicloud-kubernetes-eks

:construction: awscli scan

  • depends on the patterns in diagrams-patterns (e.g. vpc with igw, subnet and nat)

Usage

Install the package:

pipx install diagrams-exporters

terraform graph (only aws supported)

Exectute the following command in your terraform workspace, it will generate terraform graph and export to Diagrams.

diagrams-exporters terraform
# use -d to specify the output directory/file
diagrams-exporters terraform -o diagrams-exported
diagrams-exporters terraform -o dist/diagrams-exported

dot graph (only terraform/aws supported)

If you have existing .dot file

diagrams-exporters dot -f existing.dot
diagrams-exporters dot -f existing.dot -o diagrams-exported
diagrams-exporters dot -f existing.dot -o dist/diagrams-exported

Roadmap

Currently, the diagrams-patterns and diagrams-exporters are built as 'diagrams'-extensions. But since the diagrams is inactive, introducing new tools is a necessary step, e.g. d2.

At that time, the diagrams-patterns should be a standalone tool, which provide a standard DSL to describe the common patterns in cloud architecture (or other kinds of diagrams). Then, you can translate the DSL to different tools, e.g. diagrams, d2, etc.

The diagrams-exporters plays another role to facilitate with productive tools, e.g. terraform, aws cli, etc. It read the metadata, convert to DSL, then generate the diagrams.

A possible structure is:

flowchart BT
  subgraph diagram-exporters
    terraform-exporter
    awscli-exporter
    kubectl-exporter
  end

  subgraph diagrams-patterns
    subgraph common-patterns
      c4-pattern
      layer-arch-pattern    
    end

    subgraph cloud-patterns
      aws-pattern
      azure-pattern
    end

    subgraph dsl
      dsl-parser

      dsl-to-diagrams
      dsl-to-d2
      dsl-to-mermaid
    end
  end

  diagrams-patterns --> diagram-exporters
  diagrams --> diagrams-patterns
  d2 --> diagrams-patterns
  plantuml --> diagrams-patterns
  
  graphviz --> diagrams
  graphviz --> d2

  plantuml

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diagrams_exporters-0.1.0a1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

diagrams_exporters-0.1.0a1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file diagrams_exporters-0.1.0a1.tar.gz.

File metadata

  • Download URL: diagrams_exporters-0.1.0a1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for diagrams_exporters-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 d23f4c6aea6755f00ffc903a4effd92951c0f2226a5cf41936bea403da391852
MD5 9f7cffc48239bf8cd5734727997ffc62
BLAKE2b-256 7ba371112e720c9d74401cfbbea609e665b40bec261f0952d259c2a851d68968

See more details on using hashes here.

File details

Details for the file diagrams_exporters-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: diagrams_exporters-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for diagrams_exporters-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 a160855c82f16ffa658dcf59d7ee8311ad8734882daa1a14ea7ca5841554e7b1
MD5 0fda21d408d8ebe99d53a10a8899c177
BLAKE2b-256 90f34f556cbafa43d2075d52671825e25d4cd59bf6b9229f96dec6203dace847

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page