Google Cloud Professional Cloud DevOps Engineer — Question 108
Your company is using HTTPS requests to trigger a public Cloud Run-hosted service accessible at the https://booking-engine-abcdef.a.run.app URL. You need to give developers the ability to test the latest revisions of the service before the service is exposed to customers. What should you do?
Answer options
- A. Run the gcloud run deploy booking-engine --no-traffic --tag dev command. Use the https://dev--booking-engine-abcdef.a.run.app URL for testing.
- B. Run the gcloud run services update-traffic booking-engine --to-revisions LATEST=1 command. Use the https://booking-engine-abcdef.a.run.app URL for testing.
- C. Pass the curl –H “Authorization:Bearer $(gcloud auth print-identity-token)” auth token. Use the https://booking-engine-abcdef.a.run.app URL to test privately.
- D. Grant the roles/run.invoker role to the developers testing the booking-engine service. Use the https://booking-engine-abcdef.private.run.app URL for testing.
Correct answer: A
Explanation
The correct answer is A because it allows you to deploy the service without directing traffic to it, enabling developers to test the new version before it goes live. Option B incorrectly updates traffic to the latest revision, which is not suitable for pre-release testing. Option C suggests using an authorization token for private testing, but it does not specifically address testing the latest revisions. Option D involves granting roles for private access, which does not serve the need for pre-customer testing of new revisions.