Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This article explains how to set up a service account in Google Cloud Platform. Ensure you have the necessary permissions in Google Cloud.

Table of Contents
stylenone

Summary

To integrate Google Cloud Platform with Cloudaware:

  1. Create a new service account

...

  1. for Cloudaware

  2. Assign the Project Viewer role. Create and assign a custom role for tagging & backups (optional).

  3. Download a service account key (json).

  4. Enable Google APIs:

    • Compute Engine API

    • Identity and Access Management (IAM) API

    • Cloud Resource Manager API

    • Kubernetes Engine API

    • Cloud Billing API

For detailed setup instructions, refer to the in-depth guidelines below.

Create service account

  1. Log in to the Google console. Select the Google project. Go to 'IAM & admin'Service accounts → +CREATE SERVICE ACCOUNT.

    GCP start guide - setup in Google - create service account.pngImage Added

  2. Use a meaningful name, e.g.

...

  1. cloudaware-service-account

...

  1. . Click

...

  1. CREATE AND CONTINUE.

...

  1. Assign the role Project

...

...

  1. Viewer* to the service account

...

  1. .

...

  • Organization Role Viewer

  • Folder Viewer

  • Organization Viewer

  • Organization Policy Viewer

  • Project Viewer

Click Save.

Assign the 'Project Viewer' role on the organization level for Cloudaware to automatically add and collect Google Projects within a Google Organization:

Create a key

...

  1. Click DONE.

*This is the minimum access role required. For more detailed access information, refer to the guide Additional permissions in Google.

Create service account key

  1. Select the service account

...

  1. that will be added to Cloudaware. Go to the tab 'Keys' → +Create key.

  2. Select 'JSON' → 

...

  1. CREATE.

...

  1. A .json file will be automatically downloaded

...

  1. .

Save the key in a secure location as it is is required for further setup in Cloudaware.

Enable Google APIs

...

for Google Project

  1. Go back to

...

  1. Google Organization → 'APIs & Services'.

...

  1. Select the Google Project where the service account for Cloudaware was created. Click +ENABLE APIS AND SERVICES.

...

  1. Image Added

...

  1. Using the search bar,

...

  1. find and enable the following APIs:

  • Compute Engine API

  • Identity and Access Management (IAM) API

  • Cloud Resource Manager API

  • Kubernetes Engine API (learn more)

  • Cloud Billing API (learn more)

...

...

For Cloudaware to be able to collect the list of Google Billing Accounts, assign the role 'Billing Account Viewer' to the service account* that has access to billing accounts in question.

1. Go to Billing.

...

2. Go to the tab 'My Billing Accounts'. Check the box near the billing account. Click Add Principal on the right to manage permissions.

...

3. Select the service account* and assign the role Billing Account ViewerSave.

...

*Note that the service account should be added to Cloudaware.

...

A custom role is necessary if you are going to use backups and labels.

  1. Go to IAM & admin, select "Roles" and click +Create Role.

...

Add the name and the description of the custom role. Set 'Role launch stage' as General Availability and click + Add Permissions.

...

  1. Select the following permissions:

...

For backups

...

For labels

...

  • compute.disks.get

  • compute.disks.createSnapshot

  • compute.disks.list

  • compute.disks.setLabels

  • compute.snapshots.create

  • compute.snapshots.delete

  • compute.snapshots.get

  • compute.snapshots.list

  • compute.snapshots.setLabels

  • compute.zones.get

  • compute.zones.list

...

  • bigquery.datasets.update

  • bigquery.tables.update

  • cloudsql.instances.update

  • compute.addresses.setLabels

  • compute.disks.setLabels

  • compute.forwardingRules.setLabels

  • compute.globalAddresses.setLabels

  • compute.globalForwardingRules.setLabels

  • compute.images.setLabels

  • compute.instances.setLabels

  • compute.snapshots.setLabels

  • compute.targetVpnGateways.setLabels

  • compute.vpnTunnels.setLabels

  • dataproc.clusters.update

  • dataproc.jobs.update

  • cloudkms.cryptoKeys.update

  • storage.buckets.update

...

! Next step - Google setup in Cloudaware