Google Cloud Professional Cloud Developer — Question 349
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?
Answer options
- A. Store the service code as a zip file in a Cloud Storage bucket. Deploy your application by using the gcloud run deploy --source command, and test the integration by pointing Apigee to Cloud Run.
- B. Use the Cloud Run emulator to test your application locally. Test the integration by pointing Apigee to your local Cloud Run emulator.
- C. Build a container image locally, and push the image to Artifact Registry. Deploy the Image to Cloud Run, and test the integration by pointing Apigee to Cloud Run.
- D. Deploy your application directly from the current directory by using the gcloud run deploy --source command, and test the integration by pointing Apigee to Cloud Run.
Correct answer: D
Explanation
The correct answer is D because deploying directly from the current directory using the gcloud run deploy --source command allows for the quickest deployment and testing with the Apigee proxy. Options A and C involve additional steps that can slow down the process, such as uploading to Cloud Storage or building a container image. Option B requires local testing, which is not as efficient as deploying directly to Cloud Run.