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
603 stars 151 forks source link

Issue with resource group that has a period in the name #41

Closed timatlee closed 3 years ago

timatlee commented 3 years ago

I only have 1 RG with a period in the name, so testing this a bit further on my end is a bit of a challenge.

Output is as follows:

> Export-AzViz -Theme light -OutputFormat png -Show -ResourceGroup website.com_website

    █████╗ ███████╗██╗   ██╗██╗███████╗
   ██╔══██╗╚══███╔╝██║   ██║██║╚══███╔╝   Author    : Prateek Singh (Twitter @singhprateik)
   ███████║  ███╔╝ ██║   ██║██║  ███╔╝    Module    : Azure Visualizer v1.1.2
   ██╔══██║ ███╔╝  ╚██╗ ██╔╝██║ ███╔╝     Github    : https://github.com/PrateekKumarSingh/AzViz
   ██║  ██║███████╗ ╚████╔╝ ██║███████╗   Document  : https://azviz.readthedocs.io
   ╚═╝  ╚═╝╚══════╝  ╚═══╝  ╚═╝╚══════╝
 ▶ Testing Graphviz installation... 253ms
    ▶ GraphViz installation path : C:\Program Files\Graphviz\bin\dot.exe
 ▶ Configuring Defaults... 284ms
    ▶  Target Type            : Azure Resource Group
    ▶  Output Format          : png
    ▶  Exluded Resource Types :
    ▶  Output File Path       : C:\Users\tima\AppData\Local\Temp\output.png
    ▶  Label Verbosity        : 1
    ▶  Category Depth         : 1
    ▶  Sub-graph Direction    : top-to-bottom
    ▶  Theme                  : light
    ▶  Launch Visualization   : True
 ▶ Target Azure Resource Groups...  300ms
 ▶ Starting to generate Azure visualization... 308ms
    ▶ Exporting network associations for resource group: 'website.com_website'
       ▶ Network watcher found: 'NetworkWatcher_canadacentral'
       ▶ Obtaining network topology using Network Watcher
    ▶ Exporting ARM template of Azure resource group: 'website.com_website'
       ▶ Processing the ARM template to extract resources
       ▶ Total resources found: 13
       ▶ Cleaning up temporary ARM template file at: C:\Users\tima\AppData\Local\Temp\tmpBEE8.tmp.json
    ▶ Plotting sub-graph for Azure Resource Group: "website.com_website" 49.57s
       ▶ Creating Nodes
          ▶ microsoft.network/publicipaddresses/sitewebserver-ip
          ▶ microsoft.network/networkinterfaces/sitewebserver120
          ▶ microsoft.compute/virtualmachines/sitewebserver
          ▶ microsoft.compute/sshpublickeys/sitewebserver_key
       ▶ Creating Edges
          ▶ microsoft.network/publicipaddresses/sitewebserver -> ip  microsoft.network/networkinterfaces/sitewebserver120
          ▶ microsoft.network/networkinterfaces/sitewebserver120 ->  microsoft.compute/virtualmachines/sitewebserver
          ▶ microsoft.network/networkinterfaces/sitewebserver120 ->  microsoft.network/publicipaddresses/sitewebserver ip
          ▶ microsoft.compute/virtualmachines/sitewebserver ->  microsoft.network/networkinterfaces/sitewebserver120
          ▶ microsoft.network/networkinterfaces/sitewebserver120 ->  microsoft.network/publicipaddresses/sitewebserver ip
          ▶ microsoft.compute/virtualmachines/sitewebserver ->  microsoft.network/networkinterfaces/sitewebserver120
Error: C:\Users\tima\AppData\Local\Temp\temp.dot: syntax error in line 20 near '.'

Running against an RG that does not have a period in the name (but generally the same configuration - a VM with a public IP) yields a successful output.

jamesvidler commented 3 years ago

Ran into this error as well today. It looks like an amazing tool and hoping to be able to use it later! Keep up the good work. Let me know if I can assist in testing around this.