Google ACE Deploying and Implementing a Cloud Solution Practice Question
A company wants to allow unauthenticated HTTP invocations of a container deployed on Cloud Run. Which flag should be included in the 'gcloud run deploy' command?
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
✓
--allow-unauthenticated
The '--allow-unauthenticated' flag allows unauthenticated invocations. By default, Cloud Run requires authentication.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
--public
Why it's wrong here
The --public flag is not recognized by the gcloud run deploy command. gcloud CLI validates flags and will return an error indicating an unknown flag. To make a Cloud Run service publicly accessible, you must use --allow-unauthenticated, which sets the appropriate IAM policy binding for the service.
- ✗
--no-authentication
Why it's wrong here
The --no-authentication flag does not exist; it is a common shorthand that might seem intuitive but is not part of the gcloud CLI syntax. The official flag to allow unauthenticated invocations is --allow-unauthenticated, which is a boolean flag. For authenticated-only access, you would use --no-allow-unauthenticated, not --no-authentication.
- ✓
--allow-unauthenticated
Why this is correct
The --allow-unauthenticated flag is the correct option because it explicitly grants the role roles/run.invoker to allUsers, enabling public access to the Cloud Run service. This flag is a required parameter when deploying a service that must respond to HTTP requests without any authentication, such as a public API or webhook. It overrides the default behavior, which denies access to unauthenticated users.
- ✗
--auth-type public
Why it's wrong here
The --auth-type public flag is invalid; gcloud run deploy does not have an --auth-type parameter. Authentication configuration is handled by boolean flags: --allow-unauthenticated to permit public access, and --no-allow-unauthenticated to require authentication. Using an unsupported flag will cause the deployment command to fail with a parsing error before any resource changes are made.
Go deeper
Related to this question
Learn chapter
Google Cloud Platform Overview
Key term
Cloud Run
Cloud Run is a fully managed compute platform from Google Cloud that lets you run containerized applications in a serverless environment, automatically scaling from zero to thousands of requests.
Key term
Container
A container is a lightweight, standalone software package that includes everything needed to run an application, such as code, runtime, system tools, and libraries.
About these practice questions
One of 769 original ACE 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 ACE 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 ACE exam.