As a Tanzu Platform hub organization owner or administrator, you can run the Google Cloud Platform account workflow that helps you download a service account key from Google Cloud Platform and then upload it to Tanzu Platform hub, and start event monitoring.
Verify that you can log in to your Google Cloud Platform console as a user with the following organization-level permissions so that you can add roles and IAM member bindings in your GCP console.
Verify that you have access to the GCP project for which you are creating this account.
Use this workflow to add a single account. This process is useful if you do not have many GCP accounts that you want to manage. If you are new to Tanzu Platform hub, it is useful way to explore how Tanzu Platform hub can help you manage your resources.
Click New Account and click Google Cloud Platform.
Connect the account using a GCP service account key.
The steps provided in the UI are repeated in this procedure for your convenience.
vmw-secure-state-sa-key.json
.In the Account Onboarding section, enable event monitoring.
To configure Event Stream, which provides updates about security findings for this cloud account, you must configure GCP so that you can run a connection script. See the prerequisites at the beginning of this procedure.
The connection script sets up a Google Cloud Logging and Pub/Sub-based Event Stream using the following roles and permissions.
The Google-managed service account for this project, {project-number}@cloudservices.gservicesaccount.com
, is granted the following roles and permissions.
GCP Role | Permissions |
---|---|
Logs Configuration | |
Security Admin |
The Pub/Sub service account {project-number}@gcp-sa-pubsub-iam- gserviceaccount.com
is granted the Service Account Token Creator role. For information provided by Google about the roles, see Google-managed service accounts, Logs configuration writer role, Security admin role, and Configure Pub/Sub with the token creator role.
If you have multiple Google Cloud Platform accounts to add, you can add them using the GCP Organization (Multiple GCP projects) options rather than adding them one at a time.
You can onboard projects in groups of 100 accounts.
When using the following procedure, you can refer to the images and details in the single account procedure in the previous section.
You must use the scripts on the pages in this procedure. They are customized each time you onboard the resources. Do not reuse a script from previous onboarding actions.
Click Google Cloud Platform, select GCP Organization (Multiple GCP projects), and then click Continue.
To add the project root account, click Start in the Add GCP projects step.
On the General information page, enter the GCP project ID for the accounts that you are adding.
The root project ID is required here so that Tanzu Platform hub can collect the member accounts that you want to manage.
Complete the form and click Next.
If you have not added an account before, see the step in the previous single account section for this step and the others that follow for additional details.
On the Service Account Connection page, follow the on-screen instructions for adding the read-only collection IAM role for the root product account and click Next.
When you click Next, Tanzu Platform hub uses the collection role to discover the member accounts so that you can select the ones you want to manage.
On the Select GCP Projects page, review the discovered projects and select the ones that you want to add.
On the Edit Properties page, select the projects where you want to update one or more of the properties and click Next.
The properties include GCP project name, owner and owner email, Tanzu Platform hub projects, and any tags.
On the Onboard GCP Projects page, click Onboard GCP Projects.
Parent topic:Setting up data connections in VMware Tanzu Platform hub