Courseiva
easyMultiple ChoiceObjective-mapped

Google ACE Practice Question: A developer wants to use Cloud Shell to create a…

A developer wants to use Cloud Shell to create a Compute Engine VM but receives an error 'API not enabled'. What should the developer do first?

⚠ Common exam trap

Google Cloud often tests the distinction between authentication (gcloud auth login) and API enablement, trapping candidates who confuse user-level permissions with project-level service activation.

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

Enable the Compute Engine API

The error 'API not enabled' indicates that the Compute Engine API has not been activated for the developer's Google Cloud project. Cloud Shell uses the gcloud CLI, which requires the Compute Engine API to be enabled before it can create VM instances. The correct first step is to enable the Compute Engine API via the Cloud Console or the `gcloud services enable compute.googleapis.com` command.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Switch to a different region

    Why it's wrong here

    Changing the region will not resolve the 'API not enabled' error because APIs are enabled at the project level, not the region level. The Compute Engine API, when disabled, blocks creation attempts in every region uniformly. Regional selection only influences resource availability, latency, and pricing, not the service activation status. Therefore, switching regions is an ineffective workaround for this specific error.

  • Enable the Compute Engine API

    Why this is correct

    Enabling the Compute Engine API for the project is the direct and correct fix. When running `gcloud compute instances create`, Cloud Shell invokes the Compute Engine service, which returns the error 'API [compute.googleapis.com] not enabled' if the API is not activated. You can enable it by executing `gcloud services enable compute.googleapis.com` in Cloud Shell with an authenticated, authorized user. Once enabled, the API becomes available project-wide, allowing VM creation to proceed.

  • Use gcloud auth login

    Why it's wrong here

    Running `gcloud auth login` establishes user credentials and sets Application Default Credentials, but this does not affect API enablement. The 'API not enabled' error occurs during the API call, which is checked after authentication; even a fully authenticated user receives it if the service is not active. In contrast, a permissions problem would produce a 'Permission denied' or 'Forbidden' error, not an API-not-enabled message. Thus, authentication alone cannot resolve this service activation issue.

  • Increase project quota

    Why it's wrong here

    Increasing project quota does not address the root cause because the error explicitly indicates that the Compute Engine API is disabled, not that a quota limit has been exceeded. Quota errors appear as messages like 'Quota 'CPUS' exceeded' and relate to resource usage limits per project and region. While you might eventually need to request higher quotas for large-scale deployments, doing so will not activate the API. Enabling the API is a prerequisite; without it, quota adjustments are irrelevant to the immediate failure.

About these practice questions

Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.