All Projects → 28mm → Blast Radius

28mm / Blast Radius

Licence: mit
Interactive visualizations of Terraform dependency graphs using d3.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Blast Radius

Diagrams
🎨 Diagram as Code for prototyping cloud system architectures
Stars: ✭ 15,756 (+1045.06%)
Mutual labels:  graphviz, diagram
Diagram Tools
A number of small tools for generating and manipulating diagrams, mostly based around Graphviz
Stars: ✭ 95 (-93.1%)
Mutual labels:  graphviz, diagram
Visualize ruby
Transform code into a flowchart and experimentally trace the execution path through it
Stars: ✭ 237 (-82.78%)
Mutual labels:  graphviz, diagram
Scaladiagrams
Generate class diagrams from scala source code
Stars: ✭ 130 (-90.55%)
Mutual labels:  graphviz, diagram
Aws Plantuml
PlantUML sprites, macros, and other includes for AWS components.
Stars: ✭ 565 (-58.94%)
Mutual labels:  graphviz, diagram
C4 Plantuml
C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
Stars: ✭ 3,522 (+155.96%)
Mutual labels:  graphviz, diagram
Azure Plantuml
PlantUML sprites, macros, and other includes for Azure services
Stars: ✭ 247 (-82.05%)
Mutual labels:  graphviz, diagram
PlantUml-Language-Service
PlantUml Language Service extension for Visual Studio 2017 and 2019
Stars: ✭ 24 (-98.26%)
Mutual labels:  graphviz, diagram
Inframap
Read your tfstate or HCL to generate a graph specific for each provider, showing only the resources that are most important/relevant.
Stars: ✭ 430 (-68.75%)
Mutual labels:  terraform, diagram
GiGraph
Simple yet versatile library for generating graphs in the DOT language
Stars: ✭ 25 (-98.18%)
Mutual labels:  graphviz, diagram
Asciidoctor Kroki
Asciidoctor.js extension to convert diagrams to images using Kroki!
Stars: ✭ 55 (-96%)
Mutual labels:  graphviz, diagram
Protobuf Uml Diagram
Create UML diagrams from Protobuf compiled .proto files using Python
Stars: ✭ 17 (-98.76%)
Mutual labels:  graphviz, diagram
Vzl
💠 DOT Language Live Editor (GraphViz)
Stars: ✭ 83 (-93.97%)
Mutual labels:  graphviz, diagram
Terraform Aws Rabbitmq
Terraform configuration for creating RabbitMQ cluster on AWS.
Stars: ✭ 86 (-93.75%)
Mutual labels:  terraform
My Cheat Sheets
A place to keep all my cheat sheets for the complete development of ASIC/FPGA hardware or a software app/service.
Stars: ✭ 94 (-93.17%)
Mutual labels:  terraform
Diagram Vue
A editable SVG-based diagram component for Vue
Stars: ✭ 86 (-93.75%)
Mutual labels:  diagram
Terraform Landscape
Improve Terraform's plan output to be easier to read and understand
Stars: ✭ 1,263 (-8.21%)
Mutual labels:  terraform
Vaultron
🤖 Vault clusters Terraformed onto Docker for great fun and learning!
Stars: ✭ 96 (-93.02%)
Mutual labels:  terraform
Terraform Provider Google
Terraform Google Cloud Platform provider
Stars: ✭ 1,318 (-4.22%)
Mutual labels:  terraform
Terraform Aws S3 Website
Terraform Module for Creating S3 backed Websites and Route53 DNS
Stars: ✭ 85 (-93.82%)
Mutual labels:  terraform

Blast Radius

CircleCI PyPI version

Blast Radius is a tool for reasoning about Terraform dependency graphs with interactive visualizations.

Use Blast Radius to:

  • Learn about Terraform or one of its providers through real examples
  • Document your infrastructure
  • Reason about relationships between resources and evaluate changes to them
  • Interact with the diagram below (and many others) in the docs

screenshot

Prerequisites

Note: For macOS you can brew install graphviz

Quickstart

The fastest way to get up and running with Blast Radius is to install it with pip to your pre-existing environment:

pip install blastradius

Once installed just point Blast Radius at any initialized Terraform directory:

blast-radius --serve /path/to/terraform/directory

And you will shortly be rewarded with a browser link http://127.0.0.1:5000/.

Docker

To launch Blast Radius for a local directory by manually running:

docker run --rm -it -p 5000:5000 \
  -v $(pwd):/data:ro \
  --security-opt apparmor:unconfined \
  --cap-add=SYS_ADMIN \
  28mm/blast-radius

A slightly more customized variant of this is also available as an example docker-compose.yml usecase for Workspaces.

Docker configurations

Terraform module links are saved as absolute paths in relative to the project root (note .terraform/modules/<uuid>). Given these paths will vary betwen Docker and the host, we mount the volume as read-only, assuring we don't ever interfere with your real environment.

However, in order for Blast Radius to actually work with Terraform, it needs to be initialized. To accomplish this, the container creates an overlayfs that exists within the container, overlaying your own, so that it can operate independently. To do this, certain runtime privileges are required -- specifically --cap-add=SYS_ADMIN.

For more information on how this works and what it means for your host, check out the runtime privileges documentation.

Docker & Subdirectories

If you organized your Terraform project using stacks and modules, Blast Radius must be called from the project root and reference them as subdirectories -- don't forget to prefix --serve!

For example, let's create a Terraform project with the following:

$ tree -d
`-- project/
    |-- modules/
    |   |-- foo
    |   |-- bar
    |   `-- dead
    `-- stacks/
        `-- beef/
             `-- .terraform

It consists of 3 modules foo, bar and dead, followed by one beef stack. To apply Blast Radius to the beef stack, you would want to run the container with the following:

$ cd project
$ docker run --rm -it -p 5000:5000 \
    -v $(pwd):/data:ro \
    --security-opt apparmor:unconfined \
    --cap-add=SYS_ADMIN \
    28mm/blast-radius --serve stacks/beef

Embedded Figures

You may wish to embed figures produced with Blast Radius in other documents. You will need the following:

  1. An svg file and json document representing the graph and its layout.
  2. javascript and css found in .../blastradius/server/static
  3. A uniquely identified DOM element, where the <svg> should appear.

You can read more details in the documentation

Implementation Details

Blast Radius uses the [Graphviz][] package to layout graph diagrams, PyHCL to parse Terraform configuration, and d3.js to implement interactive features and animations.

Further Reading

The development of Blast Radius is documented in a series of blog posts:

  • part 1: motivations, d3 force-directed layouts vs. vanilla graphviz.
  • part 2: d3-enhanced graphviz layouts, meaningful coloration, animations.
  • part 3: limiting horizontal sprawl, supporting modules.
  • part 4: search, pan/zoom, prune-to-selection, docker.

A catalog of example Terraform configurations, and their dependency graphs can be found here.

These examples are drawn primarily from the examples/ directory distributed with various Terraform providers, and aren't necessarily ideal. Additional examples, particularly demonstrations of best-practices, or of multi-cloud configurations strongly desired.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].