# Free ACE practice questions

> 10 free ACE practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/google-associate-cloud-engineer/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/google-associate-cloud-engineer/

### Question 1 of 10

Finance wants a daily, queryable record of all Google Cloud charges, including per-resource costs for Compute Engine, so that analysts can build their own reports with SQL. What should you configure?

- A. Create a log sink that routes billing audit logs from every project to a BigQuery dataset
- B. Enable the pricing data export from the Cloud Billing account to a Cloud Storage bucket in CSV format
- C. Create a budget on the Cloud Billing account and connect its programmatic notifications to a Pub/Sub topic
- D. Enable the detailed usage cost export from the Cloud Billing account to a BigQuery dataset

**Answer:** D

**Explanation:** The detailed usage cost export writes billing data, including resource-level cost rows for supported services such as Compute Engine, into BigQuery, where analysts can query it with SQL. Budget notifications only report spend against a threshold and do not provide line-item data. The pricing export contains list prices and discounts, not actual usage charges, and it targets BigQuery rather than CSV files. Audit logs record administrative actions, not costs.

### Question 2 of 10

A startup has a hard monthly limit of USD 2,000 for a sandbox project. If spending reaches the limit, all billable services in that project must stop automatically, even if this deletes nothing and simply disrupts workloads. What should you implement?

- A. Send budget notifications to Pub/Sub and have a Cloud Run function disable billing on the project at 100%
- B. A quota override on every API in the project that lowers request limits so that the project cannot spend more than the budget amount
- C. A budget with an email alert threshold at 100% of the amount, which makes Cloud Billing suspend the project's resources at that threshold
- D. An organization policy that restricts the allowed machine types in the project so that compute costs remain below the monthly budget amount

**Answer:** A

**Explanation:** Budgets never stop spending on their own; the documented pattern is to publish budget notifications to Pub/Sub and have a function call the Cloud Billing API to detach billing, which stops billable services. An email threshold only notifies people and does not suspend anything. Quota overrides limit request rates, not monetary spend, and cannot reliably cap cost. Restricting machine types reduces some compute cost but does not stop spend at a fixed amount.

### Question 3 of 10

You are designing a VPC for two regions. The network team wants to choose every subnet range explicitly, avoid overlap with on-premises 10.0.0.0/8 ranges already used in the default auto-mode allocation, and add regions later without surprise subnets. What should you do?

- A. Create an auto mode VPC and delete the subnets in regions that you do not use, keeping the two needed regions only
- B. Create an auto mode VPC and convert it to custom mode later only if a range conflict is detected with on-premises
- C. Use the default network and add secondary ranges from 172.16.0.0/12 to the existing subnets in the two regions
- D. Create a custom mode VPC and add one subnet per region with ranges you choose, for example from 172.16.0.0/12

**Answer:** D

**Explanation:** A custom mode VPC creates no subnets automatically, so the team controls every range and region and can avoid the 10.128.0.0/9 space that auto mode uses. Auto mode VPCs always allocate from 10.128.0.0/9, which overlaps the on-premises 10.0.0.0/8 space, and you cannot delete auto-created subnets while in auto mode. The default network is auto mode with the same overlap. Converting later means the overlap already exists in the meantime.

### Question 4 of 10

A batch rendering job can be interrupted at any time and resumed from checkpoints, and it must run as cheaply as possible on Compute Engine. Which provisioning option should you choose?

- A. Sole-tenant nodes
- B. Committed use discounts for one year
- C. Sustained use discounts on standard VMs
- D. Spot VMs

**Answer:** D

**Explanation:** Spot VMs offer the deepest discount for workloads that tolerate preemption, which fits a checkpointed batch job. A one-year commitment requires steady usage for the full term and is not the cheapest choice for interruptible, bursty work. Sole-tenant nodes cost more because they dedicate physical hosts. Sustained use discounts apply automatically to standard VMs but are much smaller than Spot pricing.

### Question 5 of 10

A stateful application on a single VM must survive a zonal outage with an RPO of zero for its data disk, and failover can take a few minutes. What is the MOST appropriate storage design?

- A. Use a zonal persistent disk and take snapshots every 10 minutes with a schedule, restoring the latest snapshot in another zone
- B. Use a regional persistent disk, which replicates synchronously across two zones, and force-attach it to a standby VM on failover
- C. Use a Local SSD in RAID 1 across two VMs in different zones with application-level mirroring configured by a script
- D. Store the data on Cloud Storage FUSE in a single-region bucket and remount it from a VM in another zone

**Answer:** B

**Explanation:** Regional persistent disks synchronously replicate writes to two zones, so a standby VM in the second zone can force-attach the disk with no data loss. Snapshots every 10 minutes allow up to 10 minutes of data loss. Local SSDs cannot be mirrored across VMs as block devices without complex custom tooling. Cloud Storage FUSE does not provide block-level semantics that a stateful database expects.

### Question 6 of 10

A VM has no external IP address, and the security team forbids opening SSH from the internet. You need to SSH to it from your laptop with gcloud. What should you do?

- A. Configure Cloud NAT on the subnet so that inbound SSH sessions are translated to the VM's internal address
- B. Use the serial console with a VM metadata key instead of SSH and leave serial port access enabled permanently
- C. Create a firewall rule that allows TCP 22 from 0.0.0.0/0 and assign an ephemeral external IP temporarily
- D. Allow ingress TCP 22 from 35.235.240.0/20 and run gcloud compute ssh with the --tunnel-through-iap flag

**Answer:** D

**Explanation:** Identity-Aware Proxy TCP forwarding tunnels SSH from gcloud through Google, needing only a firewall rule for IAP's range 35.235.240.0/20 and the IAP tunnel role. Opening port 22 to the internet violates the policy. Cloud NAT handles outbound connections only and never accepts inbound sessions. Leaving serial port access permanently enabled is a weaker security posture and is meant for troubleshooting, not routine access.

### Question 7 of 10

Pods in a GKE Standard cluster fail with ImagePullBackOff when pulling images from an Artifact Registry repository in the same project. The nodes use a custom service account. What is the MOST likely fix?

- A. Enable the Container Registry API in the project and push the images again with the gcr.io hostname
- B. Grant the node service account the Storage Object Admin role on the project's Cloud Storage buckets
- C. Grant the node service account the Artifact Registry Reader role on the repository or project
- D. Add an imagePullSecrets entry with a service account JSON key to every Deployment manifest

**Answer:** C

**Explanation:** Nodes pull images with their service account, which needs roles/artifactregistry.reader on the repository or project. Storage Object Admin applies to Cloud Storage and does not grant Artifact Registry access. Container Registry is retired in favor of Artifact Registry. Using JSON keys in pull secrets works but adds long-lived key risk and is unnecessary when IAM on the node account solves the problem.

### Question 8 of 10

After enabling Data Access audit logs, an analyst needs to find every read of objects in bucket finance-reports by any user in the last day. Which Logging query is MOST precise?

- A. resource.type="gce_instance" AND textPayload:"finance-reports" AND severity>=WARNING
- B. resource.type="gcs_bucket" AND logName:"cloudaudit.googleapis.com%2Factivity" AND protoPayload.resourceName:"finance-reports"
- C. logName:"cloudaudit.googleapis.com%2Fdata_access" AND resource.labels.bucket_name="finance-reports" AND protoPayload.methodName="storage.buckets.update"
- D. resource.type="gcs_bucket" AND resource.labels.bucket_name="finance-reports" AND protoPayload.methodName="storage.objects.get"

**Answer:** D

**Explanation:** Object reads appear in Data Access audit logs on the gcs_bucket resource with methodName storage.objects.get, and filtering on bucket_name scopes it to the bucket. The activity log holds Admin Activity entries, which do not include object reads. The gce_instance resource type and textPayload apply to VM logs, not Cloud Storage. storage.buckets.update records configuration changes, not object reads.

### Question 9 of 10 (choose 2)

An engineer must run gcloud commands as the service account deployer@proj.iam.gserviceaccount.com for automation testing, without downloading a key. Which TWO steps are required? (Choose two.)

- A. Grant the engineer the Service Account Key Admin role so that gcloud can mint a temporary key
- B. Grant the engineer the Service Account Token Creator role on the deployer service account
- C. Add the engineer as a member of the deployer service account's Workload Identity pool
- D. Grant the deployer service account the Owner role so that impersonation inherits full permissions
- E. Run gcloud commands with --impersonate-service-account=deployer@proj.iam.gserviceaccount.com

**Answer:** B, E

**Explanation:** Impersonation requires roles/iam.serviceAccountTokenCreator on the target service account, and gcloud then uses --impersonate-service-account to obtain short-lived tokens. Service Account Key Admin manages keys, which the requirement avoids. Giving the service account Owner breaks least privilege and is unrelated to whether a user may impersonate it. Workload Identity pools federate external workloads and are not how a Google user impersonates a service account.

### Question 10 of 10

A team needs a role that allows starting and stopping Compute Engine VMs, but not creating or deleting them. No predefined role matches exactly. What should you do?

- A. Create a custom role with compute.instances.start, compute.instances.stop, and compute.instances.get permissions and grant it
- B. Grant Compute Instance Admin (v1) and add an IAM deny policy that blocks every other Compute Engine permission in the project
- C. Grant Compute Viewer at the project and give the team a documented runbook of the gcloud compute instances start and stop commands
- D. Grant the Editor basic role at the project level and ask the team not to delete instances

**Answer:** A

**Explanation:** Custom roles let you bundle exactly the permissions needed, such as start, stop, and get on instances. Combining a broad role with deny policies is fragile and harder to audit than a precise custom role. Editor grants far more than required. Compute Viewer is read-only, so the commands would fail without start and stop permissions.

Ready for a timed run? Take the free 15-question ACE mini exam: https://devopscodelab.com/app/exams/google-associate-cloud-engineer/mini/

DevOpsCode Lab is not affiliated with Google Cloud. ACE and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
