Hard1 markMultiple Choice
Domain 5.2: Managing service accountsService AccountsCross-ProjectIAMBigQuery

GCP ACE · Question 47 · Domain 5.2: Managing service accounts

You have an application running on a VM in 'Project A'. The application needs to write data to a BigQuery dataset located in 'Project B'.

Which TWO steps are required to configure this access securely? (Select TWO)

Answer options:

A.

Attach a service account to the VM in Project A.

B.

In Project B, grant that service account the 'BigQuery Data Editor' role.

C.

Create a VPC peering connection between Project A and Project B.

D.

Download the service account key from Project B and place it on the VM in Project A.

E.

Enable the BigQuery API in Project A.

How to approach this question

Understand how cross-project IAM works with service accounts.

Full Answer

Attach a service account to the VM in Project A., In Project B, grant that service account the 'BigQuery Data Editor' role.
Service accounts can be granted access to resources in other projects. To allow a VM in Project A to access BigQuery in Project B, you attach a service account to the VM in Project A. Then, you go to Project B's IAM settings and add that service account's email address, granting it the necessary role (e.g., BigQuery Data Editor). No keys need to be downloaded.

Common mistakes

Thinking you have to download keys to cross project boundaries. IAM natively supports cross-project bindings.

Practice the full GCP Associate Cloud Engineer Practice Exam 7

50 questions · hints · full answers · grading

More questions from this exam