Git Product home page Git Product logo

terramer's Introduction

Terramer: Terraform + Mermaid markup

Extend the terraform graph command to generate mermaid diagrams.

State

Very early code. A lot more ideas than code really.

Excuse golang noob-ness: this is my excuse to re-learn golang inspired by the masters: https://github.com/hashicorp/terraform/.

Currently using terraform as a library following this code: https://github.com/johandry/platformer/blob/master/platformer.go As we get to learn the terraform code better, we may end-up with a different mechanism to get into the customize the graph output command.

License

Same than Terraform: Mozilla Public License V2

Sample diagram

Install the mermaid markdown preview plugin for VS Code to see the rendered diagram: https://github.com/mjbvz/vscode-markdown-mermaid

Network diagram example

Source: mermaid-js/mermaid#161 (comment)

graph LR; I --> IG((IG))
  subgraph publicnet
    IG --> ELB
    NAT
  end
  subgraph webnet
    ELB --> Web1
    ELB --> Web2
    Web1 --> elb2
    Web2 --> elb2
  end
  subgraph appnet
    subgraph C1
    subgraph C1cluster1
    elb2 --> C1Prod1Ins1
    elb2 --> C1Prod1InsN
  end
  subgraph C1cluster2
    elb2 --> C1Prod2Ins1
    elb2 --> C1Prod2InsN
  end
  subgraph C1cluster3
    elb2 --> C1Prod3Ins1
    elb2 --> C1Prod3InsN
  end
  end
  subgraph C2
    subgraph C2cluster1
    elb2 --> C2Prod1Ins1
    elb2 --> C2Prod1InsN
  end
  subgraph C2cluster2
    elb2 --> C2Prod2Ins1
    elb2 --> C2Prod2InsN
  end
  subgraph C2cluster3
    elb2 --> C2Prod3Ins1
    elb2 --> C2Prod3InsN
  end
  end
  end
  subgraph dbnet
    C1Prod1Ins1 --> RDS1
    C1Prod1InsN --> RDS1
    C1Prod2Ins1 --> RDS1
    C1Prod2InsN --> RDS1
    C1Prod3Ins1 --> RDS1
    C1Prod3InsN --> RDS1
    C2Prod1Ins1 --> RDS2
    C2Prod1InsN --> RDS2
    C2Prod2Ins1 --> RDS2
    C2Prod2InsN --> RDS2
    C2Prod3Ins1 --> RDS2
    C2Prod3InsN --> RDS2
end
Loading

terramer's People

Contributors

hmalphettes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.