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.
It is capable of:
Special thanks & shoutout to
Kevin Marquette
and hisPSGraph
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! ♥👍
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:
# Ubuntu
$ sudo apt install graphviz
# Fedora
$ sudo yum install graphviz
# Debian
$ sudo apt install graphviz
# chocolatey packages Graphviz for Windows
choco install graphviz
# alternatively using windows package manager
winget install graphviz
brew install graphviz
# 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
# 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
# target single resource group
Export-AzViz -ResourceGroup demo-2 -Theme light -OutputFormat png -Show
# target single resource group with more sub-categories
Export-AzViz -ResourceGroup demo-2 -Theme light -OutputFormat png -Show -CategoryDepth 2
# target multiple resource groups
Export-AzViz -ResourceGroup demo-2, demo-3 -LabelVerbosity 1 -CategoryDepth 1 -Theme light -Show -OutputFormat png
# adding more information in resource label like: Name, type, Provider etc
Export-AzViz -ResourceGroup demo-2 -Theme light -OutputFormat png -Show -LabelVerbosity 2
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