Google Associate Cloud Engineer Question 176
Select 2Google Cloud PlatformYou are a Google Cloud Associate Cloud Engineer tasked with viewing the current inventory of running virtual machines (VMs) across all projects in your organization. Which of the following methods can you use to achieve this task?
- A
Use the Google Cloud Console to navigate to each project's Compute Engine section and list the instances.
- B
Execute the gcloud compute instances list command for each project using the Google Cloud Shell.
- C
Utilize the Google Cloud Console's Resource Manager to view all running instances across projects.
- D
Create a custom dashboard in Cloud Monitoring to aggregate VM instances across projects.
- E
Leverage the Google Cloud Console's IAM & Admin section to view running instances across projects.
Show answer and explanation
Correct answers: A, B
Explanation
To view the current inventory of running VMs across all projects, you can either manually check each project through the Google Cloud Console's Compute Engine section or use the gcloud compute instances list command for each project. These methods allow you to see the running instances in a given project. While Cloud Monitoring and Resource Manager offer valuable functionalities, they are not designed specifically for listing VM instances across projects.
- A. Correct.
This option is correct because you can manually navigate to each project in the Google Cloud Console to view the running instances under Compute Engine.
- B. Correct.
This option is correct because the gcloud command-line tool allows you to list instances for each project by specifying the project ID.
- C. Incorrect.
This option is incorrect because the Resource Manager is used for managing resources and permissions, not for viewing VM instances.
- D. Incorrect.
This option is incorrect because Cloud Monitoring is used for monitoring metrics and does not directly list running VM instances.
- E. Incorrect.
This option is incorrect because IAM & Admin is related to managing access and permissions, not for viewing specific resource inventories like VM instances.