Google Cloud Associate Cloud Engineer (ACE) · 25% practice allocation

Google Cloud ACE: Deploying and implementing a cloud solution Practice Questions

5 free sample questions from the Deploying and implementing a cloud solution domain, with answers and explanations. The full ACE bank has 251 questions across 5 domains. Questions are scenario-based and written from the official Google Cloud exam guide.

1.

Your team uses Terraform to manage infrastructure on Google Cloud. You have a main.tf file that defines a new VPC network. After running terraform init, what is the correct sequence of commands to preview the changes and then apply them?

  • A. terraform refresh then terraform run
  • B. terraform validate then terraform deploy
  • C. terraform plan then terraform apply✓ Correct
  • D. terraform diff then terraform push
Explanation

terraform plan generates an execution plan showing what changes Terraform will make without actually applying them. terraform apply then executes those changes. This is the standard Terraform workflow. terraform deploy and terraform push are not valid Terraform CLI commands. terraform diff is not a Terraform command (it is used in other tools like Pulumi). terraform refresh updates the local state file to match real-world infrastructure but does not preview or apply configuration changes, and terraform run is not a valid command.

2.

A developer wants to deploy a containerized microservice that receives sporadic HTTP requests and should scale to zero when there is no traffic. The team wants minimal infrastructure management overhead. Which Google Cloud service is the BEST fit?

  • A. Cloud Functions (2nd gen)
  • B. Cloud Run✓ Correct
  • C. Compute Engine managed instance group with autoscaling to 0
  • D. Google Kubernetes Engine (GKE) Autopilot with Horizontal Pod Autoscaler
Explanation

Cloud Run is purpose-built for containerized, stateless HTTP workloads. It scales automatically from zero to many instances with zero infrastructure management, making it the best fit. GKE Autopilot reduces node management overhead but still requires cluster configuration and does not scale pods to zero natively without additional tooling (like KEDA). Compute Engine MIGs can scale to a minimum of 0 instances but require infrastructure setup, OS patching, and container orchestration that adds management overhead. Cloud Functions (2nd gen) is backed by Cloud Run and could technically run containers, but Cloud Run is the more direct and idiomatic choice for a containerized microservice.

3.

You are deploying a stateful application on GKE that requires persistent storage for a database. The application must ensure that data persists across pod restarts but does not need data replication across zones. Which storage solution should you use?

  • A. Use a StatefulSet with a PersistentVolumeClaim backed by a single-zone Persistent Disk (gcePersistentDisk) in the same zone as the node✓ Correct
  • B. Use Google Cloud's Cloud Filestore (NFS) for shared persistent storage accessible by all pods in the cluster
  • C. Deploy the application with Compute Engine disks attached directly to the VM using the GKE node group's instance template configuration
  • D. Create a PersistentVolume using Regional Persistent Disks (gcePersistentDisk) that spans multiple zones for high availability
Explanation

Option 2 is correct. A StatefulSet with a PersistentVolumeClaim backed by a single-zone Persistent Disk ensures data persists across pod restarts and is appropriate when replication is not required. GKE will ensure the PVC remains bound to the same disk. Option 1 is incorrect—Regional Persistent Disks provide replication, which is unnecessary for this requirement and adds complexity and cost. Option 3 is wrong—directly attaching disks to nodes through instance templates bypasses Kubernetes' storage abstraction and prevents proper pod-disk binding. Option 4 is overkill—while Cloud Filestore works, it's NFS-based shared storage and more expensive; a single-zone PD is simpler for this use case.

4.

You need to deploy a web application on Compute Engine that can automatically scale based on CPU utilization. The application must always have at least 2 instances running and no more than 10. Which combination of Compute Engine features should you use?

  • A. A sole-tenant node with a custom machine type and manual scaling
  • B. An unmanaged instance group with a Cloud Monitoring alerting policy
  • C. A standalone instance with a startup script that launches additional processes when CPU is high
  • D. An instance template and a managed instance group (MIG) with autoscaling configured✓ Correct
Explanation

An instance template defines the VM configuration (machine type, disk, image, etc.), and a Managed Instance Group (MIG) uses that template to create and manage identical VMs. MIGs support autoscaling policies (including CPU-based), minimum/maximum instance counts, and automatic healing — exactly what is required here. A standalone instance cannot auto-scale by itself; it is a single VM. An unmanaged instance group does not support autoscaling or automatic healing; Cloud Monitoring alerts alone cannot provision new VMs. Sole-tenant nodes are for dedicated physical hardware and do not provide autoscaling capabilities.

5.

You are creating a VPC with multiple subnets across us-central1 and europe-west1 regions. You need to allow SSH traffic (port 22) between all subnets for administrative access, but block all other inter-subnet traffic by default. What is the correct firewall rule configuration?

  • A. Create two firewall rules: one 'allow-ssh-internal' that allows ingress on port 22 from source ranges matching all subnet CIDRs and target tags for all VMs✓ Correct
  • B. Create a single firewall rule that allows SSH traffic with the source set to '0.0.0.0/0' (all internet traffic) and apply it to all VMs with a specific network tag
  • C. Enable VPC Flow Logs on all subnets and create firewall rules that deny all traffic except port 22 for internal subnets
  • D. Configure a firewall rule that allows SSH on port 22 between subnets and then explicitly deny all other cross-subnet traffic using deny rules with priority 1000
Explanation

Option 1 is correct. You should create a firewall rule that: (1) allows ingress on port 22 (SSH), (2) restricts source traffic to the subnet CIDR ranges (not the entire internet), and (3) applies to VMs via target tags or service accounts. This allows inter-subnet SSH while blocking other traffic. Option 2 is insecure—allowing SSH from '0.0.0.0/0' exposes SSH to the entire internet. Option 3 is unnecessarily complex—VPC Flow Logs are for monitoring, not traffic control. Option 4 is wrong—while deny rules work, the approach is backwards; you should allow SSH and implicitly deny by default (default-deny firewall exists).

Test yourself across every ACE domain

The free ACE practice test mixes about 20 questions weighted like the exam. The full 251-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Deploying and implementing a cloud solution study guide (ACE) →

Other ACE domains

← All Google Cloud Associate Cloud Engineer study resources