Google ACE ACE Mock Test
50 timed questions · 100 minutes · scored by domain, with re-study links for your weakest areas.
How it works: the timer starts as soon as this page loads. Answer each question, use the numbered dots to jump around, and flag questions to come back to. You see no feedback until you submit — just like the real exam. The pass guide is 70%: note that some vendors (including AWS) use scaled scoring and do not publish a percentage pass mark, so 70% is a study guide only.
Q1.A company's compliance policy states that no resources may be created outside the europe-west2 region, in any project, now or in the future. Which approach enforces this reliably?
Explanation: Organization policies constrain what is allowed at all, and a location restriction set at the organization level is inherited by every folder and project — current and future. An IAM role controls who can act, not where resources may be created. A budget only alerts on spending. A firewall rule filters network traffic; it does not prevent resource creation in other regions.
Exam objective: ACE exam guide 1.1: Setting up cloud projects and accounts — applying organizational policies to the resource hierarchy
Q2.A team wants to be notified in their team chat channel the moment a project's spending reaches 90% of its monthly budget. What should they configure?
Explanation: Budgets support alert thresholds, and a Pub/Sub notification at a threshold can trigger automation — such as a Cloud Function that posts to a chat channel. A quota increase changes resource limits. Billing export provides data for analysis, not real-time threshold notifications. Organization policies cannot react to spending levels.
Exam objective: ACE exam guide 1.2: Managing billing configuration — establishing billing budgets and alerts
Q3.A developer runs gcloud functions deploy in a new project and gets an error: "Cloud Functions API has not been used in this project before or it is disabled." What is the fix?
Explanation: APIs are enabled per project, and the error message states the problem directly: the Cloud Functions API is not enabled in this project. The fix is gcloud services enable cloudfunctions.googleapis.com (or the console equivalent). An IAM role would not help because this is not a permission error. A quota increase addresses resource limits. The billing account is unrelated to API enablement.
Exam objective: ACE exam guide 1.1: Setting up cloud projects and accounts — enabling APIs within projects
Q4.Three teams share one billing account. Each team labels its resources with a cost-center label. Finance wants a monthly breakdown of spend by cost center. What is the best solution?
Explanation: Billing export to BigQuery captures label data with every charge, so a query grouped by the cost-center label produces an accurate monthly breakdown without restructuring billing. Separate billing accounts would work but are disruptive. Manual reporting is imprecise. Budgets track thresholds, not actual spend by label.
Exam objective: ACE exam guide 1.2: Managing billing configuration — setting up billing exports
Q5.A research team runs a large data-processing job every weekend. The job is split into independent chunks, and any chunk can be restarted if interrupted. They want the lowest possible compute cost. What should you recommend?
Explanation: Spot VMs offer 60–91% discounts in exchange for possible preemption with 30 seconds of warning — ideal for a chunked, restartable weekend job. Committed use discounts require a one- or three-year commitment and save less. Cloud Run is for request-driven services, not batch jobs, and minimum instances would bill all week. A regional GKE cluster is container orchestration infrastructure, not the cheapest batch compute.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — using Spot VM instances as appropriate
Q6.A startup is building a ride-sharing app. It needs a database for live trip data (driver locations, trip state) and a separate system for analyzing months of historical trip data with SQL. Which combination is correct?
Explanation: Firestore is a document database built for live application data with real-time sync — a fit for trip state — while BigQuery is the analytics warehouse for historical SQL analysis. Cloud SQL is a transactional database, not an analytics engine for months of data. BigQuery is not a live application database. Spanner is a globally distributed transactional database, not an analytics warehouse.
Exam objective: ACE exam guide 2.2: Planning and implementing storage and data solutions — product choice (Cloud SQL, BigQuery, Firestore, Spanner, Bigtable)
Q7.A managed instance group runs a web service. During a sale event, traffic triples for two hours and then returns to normal. The group has autoscaling enabled with a minimum of 2 and a maximum of 20 instances. What will happen during the event?
Explanation: Autoscaling is automatic in both directions: the autoscaler adds instances when the metric exceeds the target and removes them when load falls, bounded by the minimum and maximum. No manual approval is involved. The autoscaler changes instance count, not machine type — that requires a new template. Instances are removed automatically when they are no longer needed.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — creating an autoscaled managed instance group by using an instance template
Q8.A financial services company is deploying a GKE cluster that will process sensitive data. Company policy requires that cluster nodes have no public IP addresses. Which cluster configuration meets this requirement?
Explanation: Private clusters provision nodes without external IP addresses, so they are not reachable from the internet — the direct answer to the requirement. Regional and zonal describe availability scope, not networking. Autopilot describes node management, not IP addressing. A zonal cluster in a private subnet is not a GKE cluster type; private clusters are the supported mechanism.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — deploying a GKE cluster with different configurations (private clusters)
Q9.A team deploys a new Cloud Run revision and wants to verify it in production with real traffic before fully replacing the old version. What is the safest approach?
Explanation: Traffic splitting enables a canary release: a small share of real traffic validates the new revision, and the split can be shifted or rolled back instantly. Deleting the old revision removes the rollback target. A separate service with a different URL does not receive production traffic. Minimum instances control warm capacity, not traffic routing.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — deploying an application
Q10.A developer creates a firewall rule allowing ingress on port 22 from 0.0.0.0/0, then a second rule denying ingress on port 22 from 0.0.0.0/0 with a lower priority number. What happens to SSH traffic from the internet?
Explanation: Firewall rules are evaluated by priority number, lowest first: the deny rule with the lower priority number is evaluated before the allow rule, so SSH traffic is denied. Allow rules do not override deny rules — priority decides. Creation order is irrelevant. SSH is not blocked by default at the platform level; the implied deny ingress rule blocks it only when no allow rule matches.
Exam objective: ACE exam guide 2.3: Planning and implementing networking resources — creating ingress and egress firewall rules and policies
Q11.A team wants automatic daily backups of a production VM's data disk, with each backup kept for 14 days. What should they configure?
Explanation: Snapshot schedules automate point-in-time backups of Persistent Disks on a timetable, with configurable retention — exactly the requirement. A Cloud Function cannot snapshot disks on its own (it would need to call the API, which is reimplementing the schedule). A startup script runs at boot, not daily. Manual snapshots depend on a person remembering every day.
Exam objective: ACE exam guide 3.1: Managing compute resources — working with snapshots (schedule a snapshot)
Q12.A company runs VMs without external IP addresses in a private subnet. The VMs need to download packages from the public internet, but no inbound internet traffic may reach them. What should you configure?
Explanation: Cloud NAT lets private VMs initiate outbound internet connections through a shared public address, while inbound connections from the internet cannot reach them. An ingress firewall rule would allow inbound traffic, which is forbidden. External IPs would make the VMs reachable. A public DNS zone names resources; it does not provide outbound connectivity.
Exam objective: ACE exam guide 3.3: Managing networking resources — working with Cloud DNS and Cloud NAT
Q13.A team wants an alert when their application logs more than 50 ERROR entries in 10 minutes. Which sequence accomplishes this?
Explanation: Alerting policies evaluate metrics, so the log entries must first become a metric: a log-based metric counts ERROR entries, and an alerting policy on that metric fires when the count exceeds 50 in the window. An uptime check tests endpoint availability, not log volume. A BigQuery sink and scheduled query is slow and indirect. A dashboard displays data but does not alert.
Exam objective: ACE exam guide 3.4: Monitoring and logging — creating Cloud Monitoring alerts based on resource metrics; creating log-based metrics
Q14.A GKE workload's Pods are consistently using only 20% of their requested CPU, wasting cluster capacity. The team wants the requests adjusted automatically based on observed usage. Which mechanism should they use?
Explanation: Vertical Pod Autoscaling analyzes actual resource usage and adjusts the CPU and memory requests (and limits) of Pods — the right tool for over-provisioned requests. Horizontal Pod Autoscaling changes replica count, not request sizes. The node pool autoscaler adds nodes. A PodDisruptionBudget limits disruptions during maintenance; it does not resize anything.
Exam objective: ACE exam guide 3.1: Managing compute resources — managing Horizontal and Vertical autoscaling configurations
Q15.A data analyst needs to run queries against BigQuery datasets in a project and view the results, but must not be able to modify datasets or manage access. Which role should you grant?
Explanation: BigQuery Job User lets the analyst run query jobs, and BigQuery Data Viewer lets them read the datasets — together they cover the requirement with no modification rights. Owner and Editor are basic roles that grant far more than needed. BigQuery Data Editor allows modifying data, which the requirement forbids.
Exam objective: ACE exam guide 4.1: Managing IAM — managing the various role types (predefined roles)
Q16.An application running on AWS needs to read objects from a Cloud Storage bucket. The team wants to avoid creating and managing a service account key. What is the recommended approach?
Explanation: Workload Identity Federation lets workloads outside Google Cloud authenticate with short-lived tokens using their own identity provider — no long-lived key is created or stored. A key file is the pattern to avoid. A public bucket removes all access control. A user account is for a person, not an application, and sharing its credentials is a security failure.
Exam objective: ACE exam guide 4.2: Managing service accounts — creating and managing short-lived service account credentials
Q17.A team lead needs to grant a contractor the ability to start and stop VMs in one project, but no predefined role matches this exact set of permissions. What should the lead do?
Explanation: Custom roles let you grant exactly the permissions a task needs — here, start and stop only. Compute Instance Admin would also allow creating and deleting VMs. Editor is far broader still. A separate project fragments the environment and does not solve the permission granularity problem.
Exam objective: ACE exam guide 4.1: Managing IAM — defining custom IAM roles
Q18.A developer needs to run a one-off command as a service account to verify its permissions. They do not have the service account's key, and the security team will not issue one. What should the developer do?
Explanation: Impersonation lets an authorized principal temporarily act as a service account with short-lived credentials — no key file is ever issued, and the access is auditable and revocable. Owner does not let someone act as a service account. A new service account with a key defeats the no-key policy. Running the command on the VM only works if the VM uses that account and the developer can access it, and it does not verify the account's permissions from the developer's own context.
Exam objective: ACE exam guide 4.2: Managing service accounts — managing service account impersonation
Q19.A company organizes projects by environment: a Production folder and a Development folder. The compliance team needs read-only access to every project in the Production folder, including projects created in the future. What is the best approach?
Explanation: A role granted on a folder is inherited by every project inside it, including projects added later — one grant covers the whole requirement. Per-project grants are manual and miss future projects. Organization Administrator is far too broad. Merging projects destroys the separation the folder structure provides.
Exam objective: ACE exam guide 4.1: Managing IAM — viewing and creating IAM policies
Q20.A new team member asks why they were granted the Storage Object Viewer role instead of the Viewer basic role. What is the best explanation?
Explanation: The Viewer basic role grants read access to almost all resources in a project, which is far broader than the job requires. Storage Object Viewer is a predefined role scoped to reading objects in Cloud Storage — least privilege. The Viewer basic role does include Storage read access, so the first option is wrong; it is not deprecated; and basic roles can be granted to individual users.
Exam objective: ACE exam guide 4.1: Managing IAM — managing the various role types (basic, predefined, custom)
Q21.A company has 40 projects organized under folders for each department. The security team wants every project in the Engineering folder to require OS Login on all Compute Engine VMs. What is the most efficient way to achieve this?
Explanation: An organization policy set on the Engineering folder is inherited by every project inside it, so a single policy covers all current and future projects in that folder. Enabling OS Login VM by VM would work but is manual and error-prone, and it would not cover new VMs. Granting an IAM role controls who can log in, not whether OS Login is enforced on the VMs. Moving all VMs into one project would break the existing project structure and is unnecessary.
Exam objective: ACE exam guide 1.1: Setting up cloud projects and accounts — applying organizational policies to the resource hierarchy
Q22.A finance team wants to be notified by email when a project's spending reaches 50%, 90%, and 100% of $5,000 per month. What should they configure?
Explanation: Budgets are exactly this tool: a spending threshold with alert rules at chosen percentages, and they can be filtered to a single project. A quota increase changes resource limits, not spending alerts. Billing export sends cost data elsewhere for analysis but does not send threshold alerts. Organization policies restrict what resources may do; they do not monitor spending.
Exam objective: ACE exam guide 1.2: Managing billing configuration — establishing billing budgets and alerts
Q23.A developer tries to create a Cloud SQL instance in a new project and receives an error saying the Cloud SQL Admin API is not enabled. What should the developer do?
Explanation: APIs are enabled per project, and a service cannot be used until its API is enabled in that project — the error message names the exact fix. A quota increase addresses resource limits, not API enablement. An IAM role would not help because the failure is not a permission denial. Changing the billing account is unrelated to API enablement.
Exam objective: ACE exam guide 1.1: Setting up cloud projects and accounts — enabling APIs within projects
Q24.A company's monthly bill was far higher than expected. The finance team wants to analyze the charges in detail — cost by project, by service, and by label — using SQL queries. What should they set up?
Explanation: Billing export to BigQuery loads detailed daily (or hourly) cost data into a dataset where it can be queried with SQL by project, service, SKU, and label. A budget with Pub/Sub sends threshold notifications but does not provide queryable history. Enabling the Billing API does not export cost data. An invoice PDF is a summary document, not a queryable dataset.
Exam objective: ACE exam guide 1.2: Managing billing configuration — setting up billing exports
Q25.Which statement about the Google Cloud resource hierarchy is correct?
Explanation: Permissions and policies flow downward through the hierarchy: a role granted on a folder applies to every project inside it and every resource inside those projects. A project belongs to exactly one parent — one folder or the organization directly. Organization policies attach to the organization, folders, or projects, not to individual VMs. A Google Cloud account has at most one organization node.
Exam objective: ACE exam guide 1.1: Setting up cloud projects and accounts — creating a resource hierarchy
Q26.A developer creates a new project and tries to launch a Compute Engine VM, but the operation fails because billing is not enabled. What is the correct fix?
Explanation: A project must be linked to a billing account before it can use billable services such as Compute Engine VMs, and the error message names the problem directly. A budget only monitors spending and does not enable billing. A quota increase changes resource limits, not billing status. Enabling the Compute Engine API is necessary but not sufficient — the API can be enabled while billing is still missing.
Exam objective: ACE exam guide 1.2: Managing billing configuration — linking projects to a billing account
Q27.A company wants to run a containerized REST API that receives unpredictable traffic — sometimes thousands of requests per minute, sometimes none for hours. They want no server management and to pay only for what they use. Which service is the best fit?
Explanation: Cloud Run is designed for exactly this: containerized web services that scale automatically to zero when idle, with billing only for request-handling time. Compute Engine would require managing VMs and paying for idle capacity. Cloud Functions is for short event-driven tasks, not a full REST API. GKE Standard adds node management the company explicitly wants to avoid.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — selecting appropriate compute choices for a given workload
Q28.A company stores regulatory records that must be kept for seven years and are almost never accessed. Which Cloud Storage class is the most cost-effective choice?
Explanation: Archive is the cheapest storage class and is designed for data accessed less than once a year, which matches regulatory records kept for seven years. Standard is the most expensive storage class and suits hot data. Nearline and Coldline are for data accessed monthly and quarterly respectively — more often than these records — and would cost more in storage.
Exam objective: ACE exam guide 2.2: Planning and implementing storage and data solutions — choosing storage options (Standard, Nearline, Coldline, Archive)
Q29.A company is launching a public website for users worldwide. They want a single IP address, TLS termination, and users routed to the nearest healthy region. Which load balancer should they choose?
Explanation: The global external Application Load Balancer is designed for this: one anycast IP address, TLS termination, URL-based routing, and automatic routing to the nearest healthy backend worldwide. Internal load balancers have no public IP and cannot serve public users. A regional Network Load Balancer is for non-HTTP traffic within one region, not global HTTP(S).
Exam objective: ACE exam guide 2.3: Planning and implementing networking resources — load balancing
Q30.A team runs a web service on a managed instance group. They have updated the application and created a new instance template with the new version. How should they roll the update out to the running VMs?
Explanation: A rolling update replaces the group's VMs gradually with instances built from the new template, keeping the service available throughout. Instance templates are immutable and cannot be edited. Deleting and recreating the group causes an outage. Manual SSH updates defeat the purpose of a managed group and leave the VMs inconsistent with the template.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — creating an autoscaled managed instance group by using an instance template
Q31.A team wants to deploy a containerized application to Kubernetes without managing nodes, and wants to be billed for the resources their Pods request. Which GKE mode should they choose?
Explanation: Autopilot removes node management entirely and bills for the CPU, memory, and ephemeral storage requested by Pods — matching both requirements. Standard mode requires managing node pools and bills for the nodes. A zonal cluster describes availability scope, not the management mode. GKE Enterprise is for multi-cluster fleet management, not for avoiding node management.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — deploying a GKE cluster with different configurations (Autopilot)
Q32.A developer deploys a Cloud Run service and shares its URL with a customer, but the customer gets a 403 Forbidden error. The service works when the developer tests it. What is the most likely cause?
Explanation: Cloud Run services are private by default — only authenticated callers with the run.invoker role can reach them. The developer is authenticated, so it works for them; the customer is not. Allowing unauthenticated invocations (granting run.invoker to allUsers) makes the service public. Region, image size, and minimum instances do not produce a 403 for one caller and not another.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — deploying an application
Q33.A company needs a Cloud SQL for PostgreSQL instance that stays available if a zone fails. Which configuration should they choose?
Explanation: A regional Cloud SQL instance keeps a synchronous standby in a second zone and fails over automatically if the primary zone fails. A zonal instance — even with backups or point-in-time recovery — goes down with its zone; backups help you recover data, they do not keep the service running. A read replica serves read traffic and does not automatically take over writes.
Exam objective: ACE exam guide 2.2: Planning and implementing storage and data solutions — deploying data products (Cloud SQL)
Q34.A company wants one central networking team to manage the VPC, firewall rules, and IP ranges, while application teams deploy resources into that network from their own projects. Which design fits?
Explanation: Shared VPC is designed for exactly this: the host project owns the network and its configuration, while service projects deploy resources into its subnets, keeping billing and IAM separation per team. Separate VPCs with peering would fragment network management. Putting everything in one project loses per-team isolation. VPN tunnels connect to external networks, not projects.
Exam objective: ACE exam guide 2.3: Planning and implementing networking resources — creating a VPC with subnets (Shared VPC)
Q35.A media company runs a nightly video-rendering batch job. The job is fault-tolerant: if a machine is interrupted, the job restarts from its last checkpoint. The company wants to minimize the cost of the compute. What should you recommend?
Explanation: Spot VMs sell spare capacity at a 60–91% discount and can be reclaimed with 30 seconds of warning — ideal for a fault-tolerant batch job that checkpoints its progress. Committed use discounts require a one- or three-year commitment and save less than Spot pricing. Cloud Run is for request-driven services, not long batch jobs, and a minimum instance count would waste money overnight. GKE Autopilot is a container platform, not the cheapest way to run interruptible batch compute.
Exam objective: ACE exam guide 2.1: Planning and implementing compute resources — using Spot VM instances as appropriate
Q36.A VM's boot disk was corrupted by a bad software update. The team has a snapshot of the disk from before the update. What is the correct recovery approach?
Explanation: A snapshot can be used to create a new disk with the data as it was when the snapshot was taken — the standard recovery path. Deleting the snapshot destroys the backup. Resizing the disk does not repair corruption. Creating an image from the corrupted disk just preserves the corruption in bootable form.
Exam objective: ACE exam guide 3.1: Managing compute resources — working with snapshots
Q37.A company stores application logs in a Cloud Storage bucket. Logs older than 30 days are rarely read, and logs older than one year must be deleted. What should they configure?
Explanation: Lifecycle policies automate exactly this: conditions based on object age, with actions to change storage class or delete. A firewall rule controls network traffic, not object aging. A budget alerts on spending; it does not manage objects. Uniform bucket-level access controls permissions, not lifecycle.
Exam objective: ACE exam guide 3.2: Managing storage and data solutions — setting object lifecycle management policies for Cloud Storage buckets
Q38.A team wants to be notified by email whenever a VM's CPU utilization stays above 85% for more than 5 minutes. What should they create in Cloud Monitoring?
Explanation: An alerting policy combines a condition (CPU above 85% for 5 minutes) with a notification channel (email) — exactly the requirement. A dashboard displays metrics but does not notify. A log-based metric counts log entries; CPU is already a built-in metric. An uptime check tests whether an endpoint responds; it does not measure CPU.
Exam objective: ACE exam guide 3.4: Monitoring and logging — creating Cloud Monitoring alerts based on resource metrics
Q39.A team wants every new VM in a managed instance group to start with the same software and configuration, without running installation steps at boot time. What should they do?
Explanation: A custom image captures a fully configured VM, and using it in the instance template means every VM the group creates boots already configured — no install step at boot. Snapshots back up disks; they do not boot VMs. A startup script works but runs installation on every boot, which is slower and can fail. A single Persistent Disk cannot be attached to multiple VMs as a boot disk.
Exam objective: ACE exam guide 3.1: Managing compute resources — working with images
Q40.A bucket contains sensitive documents, and the security team wants a single, auditable access policy for all objects in it — no per-object exceptions. Which setting should they use?
Explanation: Uniform bucket-level access applies one IAM policy to the whole bucket, which is simpler and auditable — the recommended setting. Fine-grained access allows per-object ACLs, which is the opposite of what the team wants. Public access with signed URLs is for temporary sharing, not for enforcing a single policy. VPC Service Controls restricts data movement between services; it does not set bucket access policy.
Exam objective: ACE exam guide 3.2: Managing storage and data solutions — managing and securing objects in Cloud Storage buckets
Q41.An application writes "payment failed" to its logs when a charge is declined. The team wants an alert when this happens more than 10 times in 5 minutes. What is the correct approach?
Explanation: Alerting policies work on metrics, not on raw log text — so the pattern is to create a log-based metric that counts matching entries, then alert on the metric exceeding the threshold. You cannot alert directly on log text. Exporting to BigQuery and polling is slow and indirect. The Ops Agent collects logs and metrics but does not create the alert.
Exam objective: ACE exam guide 3.4: Monitoring and logging — creating and ingesting Cloud Monitoring custom metrics (from logs)
Q42.A GKE application receives much more traffic during business hours than at night, and the team wants the number of Pods to adjust automatically. Which mechanism should they configure?
Explanation: Horizontal Pod Autoscaling changes the replica count based on observed load — the right tool for traffic that varies by time of day. Vertical Pod Autoscaling resizes resource requests; it does not change the number of Pods. The node pool autoscaler adds nodes, not Pods, and would not help if the Pod count stays fixed. A PodDisruptionBudget limits voluntary disruptions; it does not scale anything.
Exam objective: ACE exam guide 3.1: Managing compute resources — managing Horizontal and Vertical autoscaling configurations
Q43.A Cloud SQL database was accidentally corrupted by a bad migration at 2:00 PM. The team needs the data as it was at 1:00 PM. Automated backups and point-in-time recovery are enabled. What should they do?
Explanation: Point-in-time recovery restores the instance to a specific moment using the transaction logs, which is exactly the 1:00 PM recovery the team needs. A read replica copies the corrupted data. Exporting and re-importing the corrupted database does not undo the corruption. Storage size is unrelated to data recovery.
Exam objective: ACE exam guide 3.2: Managing storage and data solutions — backing up and restoring database instances (Cloud SQL)
Q44.A company must retain its application logs for two years for compliance, and wants to analyze them with SQL. Which combination should they use?
Explanation: Both routes work: a sink to BigQuery enables SQL analysis with long retention, and a log bucket with extended retention plus Log Analytics provides SQL over stored logs. The default log bucket retains logs for 30 days, not two years. Cloud Storage export archives logs but does not make them queryable with SQL. A Pub/Sub subscription delivers messages in real time; it is not a retention or analysis solution.
Exam objective: ACE exam guide 3.4: Monitoring and logging — exporting logs to external systems; configuring log buckets, log analytics, and log routers
Q45.Pods in a GKE cluster keep getting killed with OOMKilled errors (out of memory), even though the nodes have free memory. What is the most likely cause, and what should the team adjust?
Explanation: OOMKilled means a container exceeded its own memory limit — the limit is enforced per container regardless of how much memory the node has free. The fix is to raise the memory request and limit, or let VPA size them from observed usage. More nodes do not help because the limit is per Pod, not per node. HPA adds replicas; it does not raise memory limits. The Kubernetes version is unrelated.
Exam objective: ACE exam guide 3.1: Managing compute resources — managing Horizontal and Vertical autoscaling configurations
Q46.A subnet in us-central1 is running out of IP addresses as more VMs are added. The subnet is 10.0.0.0/24. What is the correct fix?
Explanation: Subnet IP ranges can be expanded in place to a larger CIDR block, as long as the new range does not overlap another subnet's range. Moving VMs to a new VPC is disruptive and unnecessary. Deleting a subnet with running VMs is not possible and would destroy the network configuration. External IPs do not solve a shortage of internal addresses.
Exam objective: ACE exam guide 3.3: Managing networking resources — expanding a subnet to have more IP addresses
Q47.A developer needs to view the details of Compute Engine VMs in a project, but must not be able to create, modify, or delete any resources. Which role should you grant?
Explanation: Compute Viewer is the predefined role that matches the requirement exactly: read-only access to Compute Engine resources. Owner and Editor are basic roles that grant far more than read access — Owner includes billing and IAM control. Compute Instance Admin allows creating and deleting instances, which the requirement forbids.
Exam objective: ACE exam guide 4.1: Managing IAM — managing the various role types (basic, predefined, custom)
Q48.A support engineer needs a combination of permissions that no predefined role provides: view VM details and restart instances, but not create or delete them. What should you do?
Explanation: Custom roles exist for exactly this situation: when no predefined role matches, you define a role with precisely the permissions the job needs — least privilege. Editor and Compute Instance Admin both grant more than required. A separate project does not solve the permission problem and fragments the environment.
Exam objective: ACE exam guide 4.1: Managing IAM — defining custom IAM roles
Q49.An application running on a Compute Engine VM needs to write objects to a specific Cloud Storage bucket and nothing else. What is the best approach?
Explanation: A dedicated service account with the narrowest role (Storage Object Creator) scoped to the single bucket follows least privilege, and the VM authenticates automatically with no key file. Granting Storage Admin at the organization level is vastly over-broad. A downloaded key is a long-lived credential that can leak. A public bucket removes all access control.
Exam objective: ACE exam guide 4.2: Managing service accounts — using service accounts in IAM policies with minimum permissions; assigning service accounts to resources
Q50.A developer wants to test a deployment script that runs as a service account, without downloading the service account's key. What should they do?
Explanation: Impersonation lets the developer temporarily act as the service account using short-lived credentials, with no key file involved — and the access can be revoked by removing the impersonation permission. Sharing a key creates a long-lived credential. The Owner role is unrelated to acting as a service account and is far too broad. A second service account does not solve the authentication problem.
Exam objective: ACE exam guide 4.2: Managing service accounts — managing service account impersonation; creating and managing short-lived service account credentials