PrateekKumarSingh / AzViz

⚡ ☁ 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
MIT License
584 stars 146 forks source link

Error when creating Image #64

Closed DhillanK closed 2 years ago

DhillanK commented 3 years ago

Hi,

Not sure what is going on, but when trying to run this on one of my Resource Groups I get the following error.

▶ Plotting sub-graph for Azure Resource Group: "RGName" 5m 12s

Get-ImageNode : Error formatting a string: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.. At C:\Users\username\Documents\WindowsPowerShell\Modules\AzViz\1.2.1\src\private\ConvertTo-DOTLangauge.ps1:182 char:39

moiaune commented 2 years ago

Did you get it to work?

Do you by any chance happend to have an application gateway in that resource group? I'm seeing the same result and have tracked it down to network watcher results for an application gateway.

DhillanK commented 2 years ago

I can't remember now, but I did run it on my RG with an AGW and it worked. The diagram is massive though, so I can see much.

moiaune commented 2 years ago

Ok.

I dont have much experience with NetworkWatchers, but it seems (in my case atleast) that the associations belonging to Application Gateway dont have a type/provider/category defined. When Get-ImageNode tries to split the $toCateg it fails because it's null. That's why you are seeing this error.