Lucidchart Cloud Insights - Resource Count Script

Looking for help on how to use Lucidchart Cloud Insights? See this help center article.

The Lucidchart Cloud Insights add-on allows you to import data from AWS, Azure, and GCP to automatically create accurate, up-to-date, and dynamic infrastructure diagrams. Below are the instructions for how to use the resource count script to get a quote for the add-on. Because the quote is based on the size of the infrastructures you plan to import, you should only run the script on the accounts you plan to import and visualize.

  1. Download this python script. If you are familiar using the AWS CLI and python, feel free to skip to step 5.
  2. If you do not already have it installed - install the AWS CLI.
  3. If not already configured, set up a named profile for each account you plan to import using the AWS configure --profile <name> command. See this resource for more information on named profiles.
  4. Ensure python is installed.
  5. Install version 1.13.0 of the botocore library using the command:

    pip3 install botocore==1.13.0
  6. Run the downloaded script using the command (**don't forget the '-c' tag at the end!):

    awscliscript.py --profile <name1> --regions <region1> <region2> --profile <name2> --regions <region1> -c

    Example (assuming py is the command to run python):

    py awscliscript.py --profile myPreProdAccount --regions us-east-1 us-east-2 --profile myProductionAccount --regions us-east-1 -c
  7. The script will output a file named count.json containing a count of resources in each account. Send this file to Lucid to help in receiving a quote for Lucidchart Cloud Insights.
  1. Install Python 3
  2. Install the Azure CLI
  3. Download the requirements.txt file from the Azure import modal or create a new file called requirements.txt and paste the following inside:
    azure-common==1.1.24
    azure-mgmt-compute==9.0.0
    azure-mgmt-network==7.0.0
    azure-mgmt-storage==7.1.0
    azure-mgmt-subscription==0.5.0
    azure-mgmt-resource==7.0.0
    azure-mgmt-rdbms==1.9.0
    azure-mgmt-sql==0.16.0
    azure-cli-core==2.0.80
    azure-core==1.2.1
  4. Run pip3 install -r requirments.txt
  5. Run az login. Running this command gives the Azure SDK access to the Active Directory. If you would like to import a different directory please switch the Active Directory in the Azure Portal and re-run az login
  6. Download this Azure CLI script.
  7. Run python3 azurecliimport.py --count to produce a count.json which reports the total number of resources as well as the number of compute resources per subscription
  8. Send this file to Lucid to help in receiving a quote for Lucidchart Cloud Insights.
  1. Install Python 3
  2. Install GCP cli gcloud
  3. Run gcloud init
  4. Run gcloud auth application-default login and login with the credentials you want for your GCP project
  5. Download the GCP CLI script
  6. Install needed python dependencies by running pip3 install oauth2client google-api-python-client
  7. Run script with the list of project ids you want to import python3 gcpcliscript.py --projects [project_id [project_ids...]] --count
  8. The script will output a file named count.json containing a count of resources in each account. Send this file to Lucid to help in receiving a quote for Lucidchart Cloud Insights.