Getting Started with GCP

Getting started with Google Cloud Platform.

To connect to your Google Cloud Platform (GCP) you will need to create a "Read Only Service Account" for your project and download the JSON key file to import into Hava.

Log in to your Google Cloud Console. In the IAM & Admin menu, select "Service Accounts" :

Then select "+Create Service Account" :

Give the account a memorable service account name and an optional description :

Select Create, then in the Select a Role dialogue, Select Project and Viewer

On the next page select +Create Key

Select the Key Type : JSON and Create

This will download the private key to your computer.

From the Hava Environments dashboard - select Add Environments

In the Import an Environment dialogue, select the Google Cloud Tab and Select Choose File and select the file containing the Private Key JSON file

Hava will then connect to your GCP Project, import the resources and create the interactive diagram.

What if I can't see the resources I was expecting?

If you are not seeing all the resources you were expecting, it may be possible that a related or required API is not enabled in your projects.

Please ensure the following APIs are enabled in your GCP account:

  • Cloud DNS API

  • Cloud SQL API

  • Compute Engine API

  • Google Cloud Memory Store for Redis API

Once these are enabled, perform a manual sync and the resources will be added to your diagrams.

How to Import Multiple GCP Projects using the same Service Account.

Hava has support for importing multiple projects using the same service account, provided the account has access to them.

The first step is to make sure the necessary API is enabled.

Navigate to your GCP account API library and enable - "Cloud Resource Manager API"

Give your service account access to other projects.

If your service account can access the resource manager API and has access to other projects, then Hava will automatically import them.

One way to achieve this is to manually add your service account as a member for other projects.

  • Select the project you want to add access to from the drop-down menu at the top of your GCP console.

  • Navigate to "IAM & Admin" > IAM

  • Click "Add" at the top of the page

  • In the "New Members" field, add the email address of your Hava service account

  • Make sure the new member has the "Project Viewer" role

  • Save

Now you can manually sync, or wait for the next auto import and you will see resources for both projects.

Please note: Although you can add as many GCP projects as you want to each service account, the more you add, the longer each import will take. If your projects are large and the import takes more than an hour, the import may time out.

It may be better to create multiple service accounts and then use the search/custom diagrams function to create diagrams with resources from both projects.