Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization operates hundreds of Compute Engine virtual machine (VM) instances across multiple zones in a Google Cloud project. During an audit, you need to quickly locate all currently running instances that have the label environment=production to verify their disk configurations and network metadata.
Which command should you execute in Google Cloud CLI?
gcloud compute instances describe doesThe gcloud compute instances describe command is designed to return detailed configuration information (in YAML or JSON format) for a single, explicitly named virtual machine instance within a specific zone.
describe command requires you to provide the specific name and zone of a single VM instance (e.g., gcloud compute instances describe INSTANCE_NAME --zone=ZONE). It cannot search across all instances in a project.describe command does not accept a --labels filtering flag to discover instances across a project.describe.INSTANCE_NAME and --zone).You already knew the exact name and zone of a specific VM instance and needed to retrieve its entire JSON/YAML configuration file to inspect low-level disk parameters or service account scopes.
This option attempts to use a --query flag with key-value pairs to search for running instances and filter by network tags rather than metadata labels.
--filter for resource filtering, not --query. Passing --query causes a syntax error.environment=production. Network tags are distinct string identifiers used primarily for firewall rules and routing, whereas labels are key-value pairs used for organization, billing, and resource management.status:RUNNING, tags:production) is not valid filtering syntax in gcloud.environment: production) used for grouping and auditing.production, http-server) without keys, used by VPC firewall rules.--filter flag requires standard comparison expressions (e.g., key=value or key:value).Google Cloud CLI supported a --query parameter and the scenario required filtering instances by network routing tags rather than resource labels.
gcloud compute instances list with --filter isThe gcloud compute instances list command is the standard Google Cloud CLI administrative tool used to display a summary table of virtual machine instances across all zones in a project. Adding the --filter flag applies server-side or client-side expression filtering based on instance attributes, resource statuses, and key-value metadata.
gcloud compute instances list performs an aggregated list operation across every zone in the active project, locating all target VMs in a single execution.status=RUNNING restricts results exclusively to instances actively consuming compute resources and serving workloads, filtering out stopped, staging, or suspended instances.labels.environment=production queries the instance's metadata labels to isolate production workloads from staging, testing, or development systems.AND, OR, and NOT directly within filter strings.--format flags to extract specific fields like attached disk names and network tags.This approach directly isolates the required virtual machines in a single command without requiring pre-knowledge of specific instance names or individual zone locations.
gcloud compute instances get isIn Google Cloud CLI, there is no get command under the gcloud compute instances command group. Basic discovery operations rely on list (for multiple resources) or describe (for a single resource).
gcloud compute instances get returns an invalid choice error because get is not a valid verb under gcloud compute instances.--status is not a standalone top-level flag for instance retrieval; status conditions must be evaluated within the --filter expression.list to view collections of resources and describe to view individual resources.kubectl get) use get, which frequently leads to syntax confusion for administrators working across multiple cloud tools.Google Cloud CLI used get as its standard resource retrieval sub-command and supported top-level --status filtering arguments.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated