Courseiva

PCSE Practice Question: Configuring Access Within a Cloud Solution Environment

A DevOps team wants to grant a CI/CD pipeline (running on a Compute Engine VM) the ability to restart Compute Engine instances in a specific project. The VM has a service account attached. What is the best practice to grant this permission?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a custom role with compute.instances.stop and compute.instances.start permissions, and assign it to the service account at the project level.

The best practice is to create a custom role with only the required permissions (compute.instances.stop and compute.instances.start) and assign it to the service account.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a custom role with compute.instances.stop and compute.instances.start permissions, and assign it to the service account at the project level.

    Why this is correct

    Custom roles provide only necessary permissions, following least privilege.

  • Generate a service account key and use it in the CI/CD system to authenticate.

    Why it's wrong here

    Service account keys are less secure and should be avoided when possible.

  • Grant the VM's service account the roles/iam.serviceAccountUser role so it can impersonate another service account that has Compute Admin.

    Why it's wrong here

    Impersonation adds complexity and does not directly grant the needed permissions.

  • Grant the service account the Compute Admin role (roles/compute.admin) at the project level.

    Why it's wrong here

    Compute Admin is overly broad and grants many permissions beyond restart.

About these practice questions

This PCSE question is part of Courseiva's 960-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCSE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCSE exam.