- A
gcloud run deploy api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --allow-unauthenticated
This is the correct syntax for deploying a Cloud Run service with public access. `--allow-unauthenticated` enables unauthenticated invocations.
- B
gcloud run create api-service --image=gcr.io/myproject/api:v2 --zone=us-east1 --public
Why wrong: `gcloud run create` is not a valid command. Use `gcloud run deploy`. `--zone` is not used by Cloud Run; `--public` is not a valid flag.
- C
gcloud cloud-run deploy api-service --container=gcr.io/myproject/api:v2 --region=us-east1
Why wrong: `gcloud cloud-run` is not a valid command group. Use `gcloud run`. `--container` is also not the correct flag — use `--image`.
- D
gcloud run deploy --name=api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --no-auth
Why wrong: The service name is a positional argument, not a `--name` flag. `--no-auth` is not a valid flag — use `--allow-unauthenticated`.
Correct gcloud run deploy Command for Cloud Run Service
This ACE practice question tests your understanding of ace exam topics. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A team wants to deploy a container image at 'gcr.io/myproject/api:v2' as a Cloud Run service named 'api-service' in us-east1, accessible without authentication. Which command is correct?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue:
"which command"Why it matters: Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.
Quick Answer
The correct command is `gcloud run deploy api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --allow-unauthenticated`. This works because the `gcloud run deploy` command requires the service name first, then the `--image` flag to point to the exact container registry path and tag, the `--region` flag to specify the deployment location, and `--allow-unauthenticated` to disable IAM-based access control, making the endpoint publicly reachable. On the Google Associate Cloud Engineer exam, this scenario tests your understanding of the mandatory flags for a basic Cloud Run deployment, often appearing as a distractor where candidates forget the `--region` flag or mistakenly use `--no-allow-unauthenticated` for public access. A common trap is omitting the service name before the flags or confusing `gcloud run deploy` with `gcloud builds submit`. Memory tip: think "SIR-A" — Service name first, then Image, Region, and Allow-unauthenticated in that order.
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
gcloud run deploy api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --allow-unauthenticated
Option A is correct because it uses the `gcloud run deploy` command with the `--image` flag to specify the container image, `--region=us-east1` to target the correct region, and `--allow-unauthenticated` to make the service publicly accessible without authentication. This matches the exact requirements for deploying a Cloud Run service with public access.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
gcloud run deploy api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --allow-unauthenticated
Why this is correct
This is the correct syntax for deploying a Cloud Run service with public access. `--allow-unauthenticated` enables unauthenticated invocations.
Clue confirmation
The clue word "which command" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
gcloud run create api-service --image=gcr.io/myproject/api:v2 --zone=us-east1 --public
Why it's wrong here
`gcloud run create` is not a valid command. Use `gcloud run deploy`. `--zone` is not used by Cloud Run; `--public` is not a valid flag.
- ✗
gcloud cloud-run deploy api-service --container=gcr.io/myproject/api:v2 --region=us-east1
Why it's wrong here
`gcloud cloud-run` is not a valid command group. Use `gcloud run`. `--container` is also not the correct flag — use `--image`.
- ✗
gcloud run deploy --name=api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --no-auth
Why it's wrong here
The service name is a positional argument, not a `--name` flag. `--no-auth` is not a valid flag — use `--allow-unauthenticated`.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Google Cloud often tests the distinction between `gcloud run deploy` and `gcloud run create`, and the use of `--allow-unauthenticated` versus `--no-auth`, to catch candidates who confuse command syntax or flag names.
Trap categories for this question
Command / output trap
`gcloud run create` is not a valid command. Use `gcloud run deploy`. `--zone` is not used by Cloud Run; `--public` is not a valid flag.
Detailed technical explanation
How to think about this question
Cloud Run services are regional resources, and the `--region` flag specifies the Google Cloud region where the service will be deployed. The `--allow-unauthenticated` flag sets the IAM policy to allow allUsers to invoke the service, which is equivalent to granting the `roles/run.invoker` role to `allUsers`. Under the hood, this modifies the service's IAM policy binding, enabling public HTTP(S) access without requiring authentication tokens.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Related practice questions
Related ACE practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Configuring Access and Security practice questions
Practise ACE questions linked to Configuring Access and Security.
Planning and Configuring a Cloud Solution practice questions
Practise ACE questions linked to Planning and Configuring a Cloud Solution.
Ensuring Successful Operation of a Cloud Solution practice questions
Practise ACE questions linked to Ensuring Successful Operation of a Cloud Solution.
Deploying and Implementing a Cloud Solution practice questions
Practise ACE questions linked to Deploying and Implementing a Cloud Solution.
Setting Up a Cloud Solution Environment practice questions
Practise ACE questions linked to Setting Up a Cloud Solution Environment.
ACE fundamentals practice questions
Practise ACE questions linked to ACE fundamentals.
ACE scenario practice questions
Practise ACE questions linked to ACE scenario.
ACE troubleshooting practice questions
Practise ACE questions linked to ACE troubleshooting.
Practice this exam
Start a free ACE practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this ACE question test?
Read the scenario before looking for a memorised answer.
What is the correct answer to this question?
The correct answer is: gcloud run deploy api-service --image=gcr.io/myproject/api:v2 --region=us-east1 --allow-unauthenticated — Option A is correct because it uses the `gcloud run deploy` command with the `--image` flag to specify the container image, `--region=us-east1` to target the correct region, and `--allow-unauthenticated` to make the service publicly accessible without authentication. This matches the exact requirements for deploying a Cloud Run service with public access.
What should I do if I get this ACE question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "which command". Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Keep practising
More ACE practice questions
- A team's Cloud Build pipeline must: (1) run unit tests, (2) build a Docker image only if tests pass, (3) push the image…
- A team needs a database backup job to run every day at 2 AM UTC. The job calls an HTTP endpoint to trigger the backup. T…
- A team wants to receive an email alert when the average CPU utilization of VMs in a managed instance group exceeds 80% f…
- A Go service is consuming significantly more CPU than expected. The team suspects an inefficient function but doesn't kn…
- A network team is creating a new VPC and must decide between auto mode and custom mode. Why would they choose custom mod…
- A company organizes its GCP projects by business unit — Finance, Engineering, and Sales. Which resource is best suited t…
Last reviewed: Jun 30, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.