Medium1 markMultiple Choice

GCP ACE · Question 24 · Domain 3.3: Deploying and implementing Cloud Run and Cloud Functions

You are deploying a new application to Cloud Run. The application is packaged in a container image located in Artifact Registry. You want the application to be publicly accessible over HTTPS.

Which gcloud command should you use?

Answer options:

A.

gcloud run deploy my-app --image=us-central1-docker.pkg.dev/my-project/repo/my-app:v1 --allow-unauthenticated

B.

gcloud run deploy my-app --image=us-central1-docker.pkg.dev/my-project/repo/my-app:v1 --public

C.

gcloud compute instances create-with-container my-app --container-image=us-central1-docker.pkg.dev/my-project/repo/my-app:v1

D.

gcloud app deploy --image-url=us-central1-docker.pkg.dev/my-project/repo/my-app:v1

How to approach this question

Identify the gcloud command group for Cloud Run and the specific flag required for public access.

Full Answer

A.gcloud run deploy my-app --image=us-central1-docker.pkg.dev/my-project/repo/my-app:v1 --allow-unauthenticated✓ Correct
gcloud run deploy my-app --image=us-central1-docker.pkg.dev/my-project/repo/my-app:v1 --allow-unauthenticated
The command `gcloud run deploy` is used to deploy to Cloud Run. By default, Cloud Run services require IAM authentication. To make the service publicly accessible over HTTPS, you must append the `--allow-unauthenticated` flag.

Common mistakes

Guessing non-existent flags like `--public`.

Practice the full GCP Associate Cloud Engineer Practice Exam 2

50 questions · hints · full answers · grading

More questions from this exam