Google ACE Setting Up a Cloud Solution Environment Practice Question
You create a new Google Cloud project using the Cloud Console. After creating the project, you need to enable the Compute Engine API. What is the correct command to do this using the Cloud Shell?
⚠ Common exam trap
The trap is mixing up command groups — candidates pick 'gcloud projects enable' or 'gcloud compute enable' because those groups sound plausible, but the correct group is 'gcloud services' with the full API name.
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 services enable compute.googleapis.com
The correct command to enable an API in a Google Cloud project is 'gcloud services enable <API_NAME>'. For Compute Engine, the API name is compute.googleapis.com, so the full command is 'gcloud services enable compute.googleapis.com'. This uses the Service Usage API under the hood to enable the specified service for the active project.
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 projects enable compute.googleapis.com
Why it's wrong here
gcloud projects enable compute.googleapis.com is invalid because the gcloud projects command group is scoped to project lifecycle and metadata — e.g., create, list, describe, update, get-iam-policy — and does not contain an enable subcommand. Service enablement is handled by the gcloud services command group. Using a non-existent subcommand will fail with an unknown command error before making any API call. To enable an API, you must use gcloud services enable.
- ✗
gcloud compute enable compute.googleapis.com
Why it's wrong here
gcloud compute enable compute.googleapis.com is invalid because the gcloud compute command group is for managing Compute Engine resources such as instances, disks, and networks, not for enabling service APIs. The compute group has no enable subcommand; attempting it returns an invalid command error. API enablement is separate from resource management and requires the gcloud services command. The compute group cannot configure service usage state.
- ✗
gcloud api enable compute
Why it's wrong here
gcloud api enable compute is incorrect both because gcloud api is not a valid command group — the correct group is gcloud services — and because the service identifier must be the full service name ending in .googleapis.com (compute.googleapis.com), not just the short name compute. The gcloud CLI has no api alias; command parsing will reject it. Additionally, even if you tried gcloud services enable compute, it would fail to find a service named compute. Use the fully qualified service name to ensure Service Usage identifies the API.
- ✓
gcloud services enable compute.googleapis.com
Why this is correct
gcloud services enable compute.googleapis.com is the correct command to enable the Compute Engine API in the current project. It interacts with the Service Usage API to set the service's enabled state for the active project. After running this command, you can start using Compute Engine features, assuming a billing account is linked and the IAM permission serviceusage.services.enable is granted. The full service name compute.googleapis.com uniquely identifies the API.
Go deeper
Related to this question
Learn chapter
App Engine Security and IAP
Key term
Google Cloud project
A Google Cloud project is a container that holds all your cloud resources like virtual machines, databases, and storage, acting as the main building block for organizing and managing everything you do in Google Cloud.
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
About these practice questions
This ACE question is part of Courseiva's 775-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
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.