Easy1 markMultiple Choice

GCP ACE · Question 01 · Domain 1.1: Setting up cloud projects and accounts

You are starting a new project in Google Cloud and need to create a new GCP project and enable the Compute Engine API using the command line.

Which sequence of gcloud commands should you use?

Answer options:

A.

gcloud init [PROJECT_ID]
gcloud compute api enable

B.

gcloud projects create [PROJECT_ID]
gcloud services enable compute.googleapis.com --project [PROJECT_ID]

C.

gcloud create project [PROJECT_ID]
gcloud api enable compute

D.

gcloud projects new [PROJECT_ID]
gcloud compute services start

How to approach this question

Identify the correct gcloud command groups for project management (gcloud projects) and API management (gcloud services).

Full Answer

B.gcloud projects create [PROJECT_ID] gcloud services enable compute.googleapis.com --project [PROJECT_ID]✓ Correct
gcloud projects create [PROJECT_ID] followed by gcloud services enable compute.googleapis.com --project [PROJECT_ID]
To create a project via CLI, the correct command is `gcloud projects create`. To enable APIs, you use the Service Management API via `gcloud services enable`.

Common mistakes

Confusing `gcloud init` with project creation, or guessing incorrect syntax like `gcloud api enable`.

Practice the full GCP Associate Cloud Engineer Practice Exam 3

50 questions · hints · full answers · grading

More questions from this exam