GCP ACE · Question 46 · Domain 5.2: Managing service accounts
You are deploying an application on a Compute Engine instance. The application needs to write logs to Cloud Logging and read configuration files from a specific Cloud Storage bucket.
What is the MOST secure way to grant the application these permissions?
Answer options:
Use the default Compute Engine service account and leave the access scopes at their default settings.
Create a custom Service Account, grant it the specific roles needed for Logging and Storage, and attach this Service Account to the VM instance.
Generate a JSON key for a service account that has the required permissions and hardcode the key into the application's source code.
Grant the 'roles/owner' IAM role to the default Compute Engine service account.
50 questions · hints · full answers · grading