PROFESSIONAL-CLOUD-DEVELOPER · Question #380
You are developing a new Python 3 API that needs to be deployed to Cloud Run. Your Cloud Run service sits behind an Apigee proxy. You need to ensure that the Cloud Run service is running with the alre
The correct answer is D. Deploy your application directly from the current directory by using the gcloud run deploy --source. The gcloud run deploy --source . command is the fastest path from code to a live Cloud Run service. It uses Cloud Build under the hood to automatically detect the runtime, build a container image, push it to Artifact Registry, and deploy it-all in a single command from the curren
Question
You are developing a new Python 3 API that needs to be deployed to Cloud Run. Your Cloud Run service sits behind an Apigee proxy. You need to ensure that the Cloud Run service is running with the already deployed Apigee proxy. You want to conduct this testing as quickly as possible. What should you do?
Options
- AStore the service code as a zip file in a Cloud Storage bucket. Deploy your application by using
- BUse the Cloud Run emulator to test your application locally. Test the integration by pointing
- CBuild a container image locally, and push the image to Artifact Registry. Deploy the Image to
- DDeploy your application directly from the current directory by using the gcloud run deploy --source
How the community answered
(51 responses)- A4% (2)
- B4% (2)
- C10% (5)
- D82% (42)
Explanation
The gcloud run deploy --source . command is the fastest path from code to a live Cloud Run service. It uses Cloud Build under the hood to automatically detect the runtime, build a container image, push it to Artifact Registry, and deploy it-all in a single command from the current directory. Once deployed, you can immediately point the Apigee proxy at the new service URL to test the integration. Option A (zip to Cloud Storage) and Option C (manually build/push/deploy) add unnecessary steps. Option B (Cloud Run emulator) tests locally but cannot test the actual Apigee integration, which requires a real deployed endpoint.
Topics
Community Discussion
No community discussion yet for this question.