easyMultiple Choice
PDE Practice Question: A startup is using Cloud Build to automate the…
A startup is using Cloud Build to automate the training and deployment of their machine learning models. The workflow is defined in cloudbuild.yaml and includes steps to: 1) Run a training job on AI Platform Training, 2) Build a custom prediction container, 3) Deploy the container to Cloud Run for serving. The deployment step fails intermittently with the error: 'Cloud Run service already exists and is not owned by the calling user.' You need to fix this so that deployments are reliable. What should you do?
⚠ Common exam trap
Google Cloud often tests the misconception that a command-line flag like '--replace' can bypass IAM permission errors, but the root cause is always IAM misconfiguration, not a missing flag.
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
✓
Ensure the Cloud Build service account has the 'run.services.update' permission on the Cloud Run service.
The error indicates that the Cloud Run service already exists and the Cloud Build service account does not own it. The Cloud Build service account needs the 'run.services.update' IAM permission on the specific Cloud Run service to modify it during deployment. Granting this permission allows the service account to update the existing service reliably, resolving the intermittent failure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Ensure the Cloud Build service account has the 'run.services.update' permission on the Cloud Run service.
Why this is correct
The error suggests a permissions issue; granting the correct role to the Cloud Build service account resolves it.
- ✗
Delete the existing Cloud Run service manually before each build.
Why it's wrong here
Manual intervention is not scalable and defeats automation.
- ✗
Use 'gcloud run deploy --replace' in the build step to force replace the existing service.
Why it's wrong here
'--replace' flag does not exist; '--no-traffic' or update is needed.
- ✗
Use Cloud Run for Anthos instead of fully managed Cloud Run to avoid ownership issues.
Why it's wrong here
Ownership issues are due to permissions, not the platform type.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 747 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PDE 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 PDE exam.