Cloud-Infra-Visualization is an open-source tool that enables you to create infrastructure designs and diagrams for major cloud vendors programmatically. The current focus of this project is Microsoft Azure. The goal of this project is to simplify the process of visualizing your cloud infrastructure, making it easier to understand and manage.
For more detailed information, please refer to our documentation.
You can view our progress and upcoming features on our Github Project.
We currently support MOST Azure resource types.
- Retrieves all or selected subscriptions.
- Iterates over these subscriptions and gets all or selected resource groups.
- Iterates over all or selected resource groups and retrieves all resources.
- Outputs an excel file with all technical configuration details of all resources.
- Outputs a draw.io diagram which connects all resources to resource groups, DBs to servers, disks to VMs etc.
- Outputs a mermaid.js (HTML) diagram which connects all resources to resource groups, DBs to servers, disks to VMs etc.
- Outputs a json file containing all the technical data to process in other tools.
You can run the minimum script as follows:
main.py --tenant_id TENANT_ID --client_id CLIENT_ID --client_secret CLIENT_SECRET --output_xlsx --output_folder PATH_TO_OUTPUT_FOLDER
If you do not add a subscription ID, the script will iterate over all available subscriptions.
The --subscription_id
flag is optional, the script will only iterate over that subscription when added.
The --resource_group
flag is optional, the script will only iterate over that resource group when added.
The --output_xlsx
flag is optional and will output an xlsx overview of all resources and types when added.
The --output_folder
flag is optional, if this is omitted, it will write to an "output" folder in the current folder.
The --output_drawio
flag is optional, when added this will output a drawio file with your visualization.
The --output_html
flag is optional, when added this will output a HTML file with your visualization.
You can alternatively authenticate using your user account, interactively to an app registration, device code or with a client certificate.
--use_device_code
Allows you to log in using a device code that will be generated
--interactive_login
Allows you to log in using interactive login to a client that supports this.
--user_login
Allows you to log in using your own microsoft account.
--certificate_path
Allows you to set the path to your certificate to log in to the client app.
The full version with all features enabled would be:
main.py --tenant_id TENANT_ID --client_id CLIENT_ID --client_secret CLIENT_SECRET --subscription_id SUBSCRIPTION_ID --resource_group RESOURCE_GROUP --output_folder PATH_TO_OUTPUT_FOLDER --output_xlsx --output_drawio --output_docx --output_html
To build and run the Docker container with the provided Dockerfile, follow these steps:
# Clone the repository
git clone https://github.com/sander110419/Cloud-infra-visualization.git
# Navigate into the cloned directory
cd Cloud-infra-visualization
# Build the Docker image
docker build -t cloud-infra-visualization .
# Run the Docker container
docker run -v /path/to/your/output_folder:/app/output cloud-infra-visualization --tenant_id "your_tenant_id" --client_id "your_client_id" --client_secret "your_client_secret" --subscription_id "your_subscription_id" --resource_group "your_resource_group" --output_folder "/path/to/your/output_folder" --output_xlsx --output_drawio --output_mermaid
Replace "/path/to/your/output_folder" with your actual output path.
The image is also available on DockerHub
To run directly from Docker hub:
docker run -v /path/to/your/output_folder:/app/output sander110419/cloud-infra-visualization --tenant_id "your_tenant_id" --client_id "your_client_id" --client_secret "your_client_secret" --subscription_id "your_subscription_id" --resource_group "your_resource_group" --output_xlsx --output_drawio --output_mermaid
Replace "/path/to/your/output_folder" with your actual output path.
The project also includes a Graphical User Interface (GUI) for ease of use. The GUI is built using PyQt5 and provides an interactive way to input your Azure credentials, select subscriptions, and choose output options.
You can run the GUI by executing the following command:
python frontend.py
The GUI provides the following features:
-
Load Identity: This button allows you to load a previously saved identity. An identity consists of a Tenant ID, Client ID, and Client Secret.
-
New Identity: This button opens a dialog where you can enter a new identity. You will need to provide a Tenant ID, Client ID, and Client Secret. The identity gets safely stored in the keyring (Linux Keyring or Windows Credential storage)
-
Subscription List: This list shows all the subscriptions available for the loaded identity. You can select one or more subscriptions to be included in the visualization.
-
Advanced Options: This section allows you to specify additional options such as output format (Excel or DrawIO), resource group name, resource group tag key/value, resource tag key/value, and output folder.
-
Start Document Generation: This button starts the document generation process. The output will be displayed in the text area below the button, after which you can choose to open the output folder.
The roadmap for this project includes:
The base of the project will be developed first, setting up the foundation for the rest of the features. The project will be written in Python and in the future contain a web front-end for ease-of-use.
Currently the aim is to fully support Azure, with any other providers in the future.
Different types of visualizations will be supported. These include:
- Draw.io: You will be able to export your infrastructure diagrams to Draw.io (XML) format.
- HTML: You will be able to export your infrastructure diagrams to Mermaid.js (Markdown) format.
Soon:
- Visio: Visio format will also be supported for those who prefer using Microsoft's tool.
- PDF: For easy sharing and viewing, you will be able to export your diagrams to PDF.
- Markdown: For simplicity and compatibility with platforms like GitHub, we will also support exporting diagrams in Markdown format.
I'd love this to one day be a viable replacement for tools like Cloudockit, Holori or Lucidscale with a frontend for ease of use.
This project is available under the GPL-3.0 license.
Feel like contributing to the project? More info here
You can get also contact me via the project Discord Channel HERE