ASSOCIATE-CLOUD-ENGINEER · Question #289
You recently received a new Google Cloud project with an attached billing account where you will work. You need to create instances, set firewalls, and store data in Cloud Storage. You want to follow
The correct answer is B. Use the gcloud services enable compute.googleapis.com command to enable Compute Engine. To create instances and set firewalls in a new Google Cloud project, following Google-recommended practices, you must enable the Compute Engine API, which provides the necessary functionalities for these operations.
Question
Options
- AUse the gcloud CLI services enable cloudresourcemanager.googleapis.com command to enable
- BUse the gcloud services enable compute.googleapis.com command to enable Compute Engine
- COpen the Google Cloud console and enable all Google Cloud APIs from the API dashboard.
- DOpen the Google Cloud console and run gcloud init --project in a Cloud Shell.
How the community answered
(25 responses)- B92% (23)
- C4% (1)
- D4% (1)
Why each option
To create instances and set firewalls in a new Google Cloud project, following Google-recommended practices, you must enable the Compute Engine API, which provides the necessary functionalities for these operations.
Enabling `cloudresourcemanager.googleapis.com` is for managing projects and resources at a higher level, but it does not enable the specific services (like Compute Engine or Cloud Storage) needed to create instances or store data.
To create virtual machine instances and manage firewall rules, the Google Compute Engine API (`compute.googleapis.com`) must be explicitly enabled in the project, which is a necessary and specific step for the requested actions.
Enabling all Google Cloud APIs is not a Google-recommended practice, as it can introduce unnecessary costs and security risks; only the required APIs should be enabled.
Running `gcloud init --project` configures the `gcloud` CLI for a specific project and user, but it does not enable any Google Cloud APIs, which are necessary for interacting with services like Compute Engine or Cloud Storage.
Concept tested: Enabling Google Cloud APIs for services
Source: https://cloud.google.com/apis/docs/getting-started#enabling_apis
Topics
Community Discussion
No community discussion yet for this question.