Skip to content

⚡ ☁ Azure Visualizer aka 'AzViz' : A #powershell module to automatically generate Azure resource topology diagrams by just typing a PowerShell cmdlet and passing the name of one or more Azure Resource groups

License

Notifications You must be signed in to change notification settings

PrateekKumarSingh/AzViz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Azure Visualizer, aka 'AzViz'

PowerShell Gallery PowerShell Gallery GitHub issues CI Documentation Status License

Azure Visualizer aka 'AzViz' - PowerShell module to automatically generate Azure resource topology diagrams by just typing a PowerShell cmdlet and passing the name of one or more Azure Resource Group(s).

Cloud admins are not anymore doomed to manually document a cloud environment! The pain of inheriting an undocumented cloud landscape to support is gone 😎😉 so please share this project with your colleagues and friends.

Buy Me A Coffee

It is capable of:

  • Finding Resources in a Azure Resource Group and identifying their dependencies.
  • Plot nodes and edges to represent Azure Resources and their dependencies on a graph.
  • Insert appropriate Azure Icons on basis of resource category/sub-category.
  • Label each resource with information like Name, Category, Type etc.
  • Generate visualization in formats like: .png and .svg
  • Output image can be in 'light', 'dark' or 'neon' theme.
  • Can target more than one resource group at once.
  • Change direction in which resource groups are plotted, i.e, left-to-right or top-to-bottom.

Thanks and shoutouts

Special thanks & shoutout to Kevin Marquette and his PSGraph module which seeded the idea for programmatical approach to Azure Visualization while I was working with Kevin's module. And without which 'AzViz' module won't be possible! ♥👍

Demo Video - Youtube

Demo Video

Prerequisite

We need to install GraphViz on our system before we can proceed with using the 'AzViz' PowerShell module. Depending upon the operating system you are using please follow the below mentioned steps:

Linux

# Ubuntu
$ sudo apt install graphviz

# Fedora
$ sudo yum install graphviz

# Debian
$ sudo apt install graphviz

Windows

# chocolatey packages Graphviz for Windows
choco install graphviz

# alternatively using windows package manager
winget install graphviz

Mac

brew install graphviz

Installation

From PowerShell Gallery

# install from powershell gallery
Install-Module -Name AzViz -Scope CurrentUser -Repository PSGallery -Force

# import the module
Import-Module AzViz

# login to azure, this is required for module to work
Connect-AzAccount

Clone the project from GitHub

# optionally clone the project from github
git clone https://github.com/PrateekKumarSingh/AzViz.git
Set-Location .\AzViz\AzViz
   
# import the powershell module
Import-Module .\AzViz.psm1 -Verbose

# login to azure, this is required for module to work
Connect-AzAccount

How to use?

Target Single Resource Group

# target single resource group
Export-AzViz -ResourceGroup demo-2 -Theme light -OutputFormat png -Show

Target Single Resource Group with more sub-categories

# target single resource group with more sub-categories
Export-AzViz -ResourceGroup demo-2 -Theme light -OutputFormat png -Show -CategoryDepth 2

Target Multiple Resource Groups

# target multiple resource groups
Export-AzViz -ResourceGroup demo-2, demo-3 -LabelVerbosity 1 -CategoryDepth 1 -Theme light -Show -OutputFormat png

Add Verbosity to Resource Label

# adding more information in resource label like: Name, type, Provider etc
Export-AzViz -ResourceGroup demo-2 -Theme light -OutputFormat png -Show -LabelVerbosity 2

Change Log

v1.2.1

  • Fixed casing for loadbalancer.png in AzViz/src/private/Images.ps1 to match the filename for AzViz/icons/LoadBalancers.png as AzViz could not find the icon when run from pwsh on a Linux VM. pull-request by @madsaune

v1.2.0

  • Handled condition to skip resources out of resource group, this should fix issue#37 and issue#39
  • Handled period in resource group name, this should fix issue#41
  • If there are no edges between the nodes, then graph legends are not plotted, this should fix issue#38
  • Empty resource groups skips, resource visualization for all later targets, this should fix issue#50. Thanks @madsaune finding the bug and creating the issue.
  • Add Vnet-only resource groups to graph visualization. Special thanks to @madsaune for the pull-request

v1.1.2

  • Network infra and the associated resources are represented in much better way
  • Improve network diagrams with Virtual Networks containing Subnets and resources
  • Azure Icons with labels showing informarion on Subscriptions, RGs, VNet, Subnets
  • Excluding Azure resource types/providers
  • Supports empty virtual networks
  • Improved dark and neon themes
  • Supports diagram legends
  • Bug Fixes

About

⚡ ☁ Azure Visualizer aka 'AzViz' : A #powershell module to automatically generate Azure resource topology diagrams by just typing a PowerShell cmdlet and passing the name of one or more Azure Resource groups

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published