All practice questions

1598 questions

Question 401Question

An organization is setting up an automated continuous delivery pipeline for a microservice deployed to Cloud Run using Google Cloud Deploy. The architecture team requires progressive traffic shifting to canary instances during release rollout and mandatory container image security attestation before deployment. Which TWO deployment pipeline configurations should you implement to satisfy these requirements?

Select all that apply

Show answer & explanation

Answer: Configure a Google Cloud Deploy delivery pipeline with a canary deployment strategy specifying explicit traffic split percentages.; Enable Binary Authorization policy enforcement on the target environment to validate attestations signed by the CI/CD pipeline.

Answer

To establish a secure continuous delivery pipeline with canary release capabilities on Google Cloud, you should configure a Cloud Deploy delivery pipeline with explicit canary traffic split percentages and enforce Binary Authorization policy validation for container image attestations.
Configuring Cloud Deploy with a canary delivery strategy allows automated progressive traffic management for Cloud Run targets. Combining this with Binary Authorization ensures that only container images that have passed vulnerability scans and signed attestations can be deployed into the target environment.

Step-by-Step Solution

1
Identify the release strategy requirements for traffic shifting
Google Cloud Deploy provides built-in canary strategies to automate progressive traffic routing to Cloud Run services.
Canary deployment strategies reduce release risk by routing a small percentage of traffic to the new revision before full promotion.
2
Identify the security verification requirement for container image deployment
Enabling Binary Authorization on Cloud Run targets ensures container images must possess cryptographic attestations generated during CI/CD security scans.
Binary Authorization acts as an enforcement gate preventing unauthorized or unverified container images from being deployed.

Key Concept

Automating progressive canary deployments using Cloud Deploy combined with Binary Authorization container security policy enforcement.
Question 402Question

An enterprise organization is deploying a hub-and-spoke Virtual Private Cloud (VPC) topology on Google Cloud. The central Hub VPC connects to an on-premises data center using Dedicated Interconnect with Cloud Router. Separate spoke VPCs host Production and Staging workloads. The lead architect must enforce the following networking requirements:
1. Spoke VPCs must securely communicate with services in the Hub VPC and access on-premises resources via the Dedicated Interconnect.
2. Spoke VPCs must remain strictly isolated from one another without direct or inter-spoke transit path communication.
3. Workloads in spoke VPCs must reach Google Cloud APIs and private Google Kubernetes Engine (GKE) control planes securely without assigning public IP addresses or exposing master endpoints to the public internet.

Which TWO configuration actions should the Cloud Architect implement to satisfy these architecture requirements? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Establish VPC Network Peering between each spoke VPC and the Hub VPC, enabling custom route export on the Hub peering and custom route import on the spoke peerings.; Enable Private Google Access on subnets within spoke VPCs and configure Authorized Networks for private GKE cluster control plane endpoints using internal IP ranges.

Answer

The correct architecture requires establishing VPC Network Peering between each spoke and the Hub VPC with custom route import/export enabled to exchange dynamic routes with Dedicated Interconnect, and enabling Private Google Access along with GKE control plane authorized networks using internal IP ranges.
Establishing VPC Network Peering between each spoke and the Hub VPC ensures that spoke workloads can reach central resources while remaining strictly isolated from each other, because VPC Network Peering is non-transitive by design. Enabling custom route export on the Hub peering and custom route import on the spoke peerings allows dynamic routes learned via BGP on the Dedicated Interconnect Cloud Router to propagate into the spoke routing tables. Additionally, enabling Private Google Access on spoke subnets allows private instances to reach Google APIs, while configuring GKE control plane authorized networks with internal IP ranges ensures secure management access without internet exposure.

Step-by-Step Solution

1
Analyze spoke-to-hub and inter-spoke network isolation requirements.
Identify that VPC Network Peering provides non-transitive regional and global routing, ensuring Hub-to-spoke connectivity while preventing spoke-to-spoke communication.
VPC Network Peering naturally prevents inter-spoke transit traffic, fulfilling the security boundary requirement between Production and Staging.
2
Configure hybrid route propagation from Dedicated Interconnect to spokes.
Enable 'export custom routes' on the Hub side of the peering and 'import custom routes' on the spoke side.
This allows the dynamic BGP routes learned by Cloud Router in the Hub VPC over Dedicated Interconnect to be advertised to and learned by the spoke VPC routing tables.
3
Configure private API and GKE master access for internal instances.
Enable Private Google Access on spoke subnets and restrict GKE control plane access to authorized internal IP ranges.
Private Google Access grants internal-only VMs access to Google services, and authorized networks restrict private GKE cluster control plane access to designated internal network segments.

Key Concept

Hub-and-spoke VPC topology design using VPC Network Peering non-transitivity, custom BGP route exchange, and Private Google Access.
Question 403Question

An infrastructure team is automating continuous deployment pipelines for Google Kubernetes Engine (GKE) targets using Terraform and Cloud Deploy. During pipeline executions, team members express concern that local state storage could lead to state corruption and concurrency issues across pipeline runs. Which configuration should the team implement to secure and maintain their Terraform state file?

Show answer & explanation

Answer: Store the Terraform state file in a Cloud Storage bucket with object versioning and state locking configured as a remote backend.

Answer

Store the Terraform state file in a Cloud Storage bucket with object versioning and state locking configured as a remote backend.
Configuring a Google Cloud Storage bucket with object versioning and state locking as a remote backend ensures a centralized, durable, and concurrency-safe repository for Terraform state files across automated release pipelines.

Step-by-Step Solution

1
Identify the risk associated with local state files in automated pipelines.
Local state files cause concurrency conflicts and risk corruption when multiple pipelines run simultaneously.
Automated deployments require a shared, reliable single source of truth for infrastructure state.
2
Select the GCP remote backend solution designed for Terraform state.
Cloud Storage bucket with versioning enabled and native object locking.
Cloud Storage supports Terraform remote backends, maintaining version history and preventing simultaneous modification conflicts.

Key Concept

Automating Continuous Deployment Pipelines and Release Strategies - IaC State Management
Question 404Question

An enterprise architecture team is implementing an automated Infrastructure as Code workflow to provision a multi-region Cloud Spanner database encrypted with Customer-Managed Encryption Keys (CMEK). Place the operational steps in the mandatory execution sequence required to successfully deploy the database and grant application access without permission or lifecycle failures.

Drag items to arrange them in the correct order

Show answer & explanation

Answer

The mandatory operational sequence is: 1) Create the Cloud KMS KeyRing/CryptoKey and grant the Cloud Spanner Service Agent the Encrypter/Decrypter role; 2) Provision the Cloud Spanner instance; 3) Provision the Cloud Spanner database specifying the KMS key in the encryption configuration; 4) Apply database IAM bindings for application service accounts.
Provisioning a CMEK-encrypted Cloud Spanner database requires strict prerequisite ordering: first, the Cloud Spanner service agent must be granted Cloud KMS encrypter/decrypter permissions on the key; second, the parent Spanner instance must be provisioned; third, the database is created using the KMS key configuration; finally, fine-grained IAM database user permissions are assigned to application service accounts.

Step-by-Step Solution

1
Configure Cloud KMS and IAM Delegation
The Cloud Spanner Service Agent is granted permissions to encrypt and decrypt data using the dedicated Cloud KMS key.
If CMEK encryption is specified during database creation without prior IAM delegation to the service agent, the API call will fail with a permission denied error.
2
Provision Spanner Instance
The parent Cloud Spanner instance is allocated with the specified node count and multi-region configuration.
Databases in Spanner must belong to an existing parent instance resource.
3
Provision Spanner Database with CMEK
The database is created inside the instance and encrypted using the authorized Cloud KMS key.
The Spanner service validates key existence and service account access during database initialization.
4
Bind Database IAM Roles
Application service accounts receive fine-grained read/write access to the newly created database.
Resource-level IAM policies for databases require the target database resource ID to exist.

Key Concept

Cloud Spanner CMEK Provisioning Dependencies and Lifecycle Ordering
Question 405Question

An enterprise Site Reliability Engineering (SRE) team needs to route all data access and administrative audit log entries from multiple production Google Cloud projects into a centralized BigQuery dataset for long-term compliance analysis, while also establishing real-time operational alerts when critical application errors captured in the logs exceed an acceptable threshold. The solution must follow Google Cloud security and operational best practices. Which TWO configuration steps should the team perform to achieve this goal?

Select all that apply

Show answer & explanation

Answer: Create an organization-level aggregated log sink targeted to the central BigQuery dataset destination, and grant the sink's writer identity the BigQuery Data Editor role on the destination dataset.; Create a log-based metric in Cloud Logging to extract error occurrences, and configure a Cloud Monitoring alerting policy using the threshold of this metric.

Answer

The team should create an organization-level aggregated log sink directed to the central BigQuery dataset while granting the sink's writer identity the BigQuery Data Editor role, and create a log-based metric to trigger Cloud Monitoring alerting policies.
The correct architecture uses an organization-level aggregated sink with least-privilege IAM permissions (BigQuery Data Editor) to safely aggregate audit logs into BigQuery, combined with Cloud Logging log-based metrics and Cloud Monitoring alerting policies to trigger real-time operational alerts on critical application error rates.

Step-by-Step Solution

1
Configure centralized log aggregation across all production projects.
An organization-level aggregated log sink routes specified audit log entries across all child projects into a unified BigQuery dataset.
Centralized sinks avoid the operational overhead of configuring individual project sinks.
2
Grant minimum required IAM roles to the sink's writer identity.
The log sink service account receives the BigQuery Data Editor role on the destination dataset.
Least privilege principles mandate using fine-grained predefined roles instead of primitive roles like Owner.
3
Establish real-time metric-based alerting on log error events.
A log-based metric counts error occurrences and feeds into a Cloud Monitoring alerting policy with defined threshold conditions.
Cloud Monitoring requires numeric metrics (derived from logs via log-based metrics) to evaluate alerting conditions and trigger incident notifications.

Key Concept

Centralized Log Aggregation and Log-based Metric Operational Alerting
Question 406Question

A DevOps team wants to automate the deployment of containerized application releases to Google Kubernetes Engine (GKE) while maintaining an automated deployment pipeline and declarative release management using Google Cloud native services. Which service should they use to manage and automate progressive delivery and releases across environments?

Show answer & explanation

Answer: Google Cloud Deploy

Answer

Google Cloud Deploy is the Google Cloud managed service specifically built to automate continuous delivery pipelines and release strategies for GKE and Cloud Run targets.
Google Cloud Deploy is Google Cloud's managed continuous delivery service that automates progressive application releases across pipeline stages (e.g., development, staging, production) on compute targets such as Google Kubernetes Engine (GKE) and Cloud Run.

Step-by-Step Solution

1
Identify the primary requirement
The requirement is to automate continuous deployment pipelines and release management using a managed GCP service for GKE target environments.
Managed release orchestration reduces operational maintenance and automates progressive delivery strategies.
2
Evaluate Google Cloud native CD tools
Google Cloud Deploy provides opinionated, automated release management and progressive delivery across multi-stage targets.
Cloud Deploy natively integrates with GKE, Skaffold, and Cloud Build to execute continuous delivery.

Key Concept

Continuous Delivery Automation with Google Cloud Deploy
Question 407Question

A digital gaming enterprise is designing the backend architecture on Google Cloud for a new multiplayer title. The backend consists of two main services:

1. Matchmaking & User Profile Service: A stateless containerized HTTP/2 REST API with highly variable traffic pattern that needs to scale instantly from zero to thousands of concurrent requests while minimizing operational overhead.
2. Real-time Game State Engine: A custom C++ stateful server application that requires persistent low-latency raw TCP sockets, direct access to host network interfaces, and specific Linux kernel tuning parameters (`sysctl` network stack modifications).

Which compute platform combination should the cloud architect select to satisfy these requirements while adhering to Google Cloud best practices?

Show answer & explanation

Answer: Deploy the Matchmaking & User Profile Service on Cloud Run, and deploy the Real-time Game State Engine on Compute Engine Managed Instance Groups (MIGs).

Answer

Deploy the Matchmaking & User Profile Service on Cloud Run, and deploy the Real-time Game State Engine on Compute Engine Managed Instance Groups (MIGs).
The solution selecting Cloud Run for the HTTP microservice and Compute Engine MIGs for the stateful engine correctly aligns platform capabilities with workload constraints. Cloud Run provides zero-to-hero serverless autoscaling for stateless REST APIs with zero infrastructure maintenance. Compute Engine provides root OS access required to modify `sysctl` Linux kernel parameters and handle persistent stateful TCP sockets.

Step-by-Step Solution

1
Analyze workload requirements for Service 1 (Matchmaking & User Profile API).
The service is stateless, HTTP-based, requires rapid auto-scaling down to zero, and demands minimal operational management.
Cloud Run is Google Cloud's fully managed serverless platform specifically designed for stateless HTTP workloads, offering fast scaling to zero without node administration.
2
Analyze workload requirements for Service 2 (Real-time Game State Engine).
The application is stateful, uses non-HTTP raw TCP sockets, and requires host kernel configuration (`sysctl` network stack tuning).
Serverless platforms (Cloud Run/App Engine) do not permit arbitrary kernel-level tuning or persistent raw TCP connection management. Compute Engine (VMs / MIGs) provides complete OS and kernel-level control.
3
Select the platform combination balancing operational overhead and technical capabilities.
Pair Cloud Run for the stateless API with Compute Engine MIGs for the kernel-tuned stateful engine.
This combination minimizes management effort for standard web services while providing maximum OS flexibility where strictly required.

Key Concept

Selecting optimal GCP compute platforms based on workload statefulness, protocol requirements, kernel customization needs, and operational overhead limits.
Estimated Time:2m 0s
Question 408Question

An enterprise architecture team is designing an operational observability solution for an organization containing over 100 Google Cloud projects. The team needs to set up centralized real-time alerting for system crash events recorded across all Compute Engine virtual machine instances. The solution must minimize administrative overhead, enforce the principle of least privilege, and route matching log entries to a central Cloud Pub/Sub topic located in a dedicated operational monitoring project. Which configuration approach should the architect recommend?

Show answer & explanation

Answer: Create an aggregated log sink at the organization level targeting the central Cloud Pub/Sub topic with an appropriate inclusion filter, and grant the sink's writer identity the Pub/Sub Publisher role on the destination topic.

Answer

The architect should create an aggregated log sink at the organization level with an inclusion filter targeting the central Cloud Pub/Sub topic, and grant the sink's writer identity the Pub/Sub Publisher role on the destination topic.
Creating an aggregated log sink at the organization resource level allows centralized log collection from all child projects, eliminating per-project configuration drift. Granting the sink's unique writer identity the predefined Pub/Sub Publisher role (`roles/pubsub.publisher`) directly on the target Pub/Sub topic satisfies security least-privilege standards.

Step-by-Step Solution

1
Evaluate scope and management overhead for log aggregation
Using an organization-level aggregated log sink allows central collection of logs from all current and future child projects without managing separate sinks in 100+ projects.
Organization-level sinks scale seamlessly across complex project hierarchies.
2
Determine destination routing and access control requirement
Aggregated sinks generate a unique service account (writer identity). The destination Pub/Sub topic must grant this specific identity permission to publish messages.
Cloud Logging export authentication relies on service account writer identities assigned to sinks.
3
Apply least-privilege IAM permissions
Assigning `roles/pubsub.publisher` on the target topic grants the exact permission required (`pubsub.topics.publish`) without granting excessive project-level or primitive permissions.
Least-privilege security policy dictates avoiding broad roles like Editor or Service Account Admin.

Key Concept

Organization Aggregated Log Sinks and Least-Privilege IAM
Question 409Question

A digital media organization needs to migrate 450 TB450\text{ TB} of historical raw video footage from an on-premises Network Attached Storage (NAS) array to a Cloud Storage bucket in Google Cloud. The organization has a dedicated 100 Mbps100\text{ Mbps} internet connection available for cloud operations. Business stakeholders require all video assets to be fully transferred and validated in Google Cloud within 21 days21\text{ days}. Which migration strategy best satisfies these operational requirements?

Show answer & explanation

Answer: Order a Google Cloud Transfer Appliance, copy the data locally from the NAS onto the appliance, ship it to Google for ingestion into Cloud Storage, and validate object integrity.

Answer

Utilize Google Cloud Transfer Appliance to transfer the 450 TB dataset offline, copy the files locally, and ship the physical appliance back to Google for ingestion into Cloud Storage.
Transferring 450 TB450\text{ TB} over a 100 Mbps100\text{ Mbps} internet line requires over 400 days of continuous transfer time. Ordering a Google Cloud Transfer Appliance allows the enterprise to perform high-speed local data capture on-premises, ship the appliance back securely, and ingest the data into Cloud Storage within the required 21-day window.

Step-by-Step Solution

1
Calculate the theoretical minimum network transfer time for online migration.
At 100 Mbps100\text{ Mbps} (12.5 MB/s12.5\text{ MB/s}), transferring 450 TB450\text{ TB} (450,000 GB450,000\text{ GB}) takes 450,000 GB0.0125 GB/s=36,000,000 seconds416 days\frac{450,000\text{ GB}}{0.0125\text{ GB/s}} = 36,000,000\text{ seconds} \approx 416\text{ days}.
Online migration over a 100 Mbps connection cannot meet the 21-day deadline.
2
Evaluate GCP data transfer mechanisms for high-capacity offline migration.
Google Cloud Transfer Appliance enables shipping physical high-capacity storage racks to load data locally at multi-Gbps speeds.
Offline transfer bypasses network bandwidth limitations and completes data ingestion within a few business days.
3
Select appropriate storage target for unstructured video files.
Cloud Storage Standard bucket is the cost-effective and architecturally correct destination for large media assets.
Cloud Storage provides scalable object storage optimized for raw video files.

Key Concept

Selecting Data Transfer Services Based on Dataset Size and Available Bandwidth
Estimated Time:1m 30s
Question 410Question

A financial enterprise is architecting an online payment fraud risk evaluation service on Google Cloud. The workload consists of stateless containerized microservices that communicate via HTTP/2 gRPC. The service experiences extreme request volatility, surging to tens of thousands of requests per second during peak retail hours and dropping to near zero overnight. The leadership team requires a compute solution that minimizes operational management overhead, automatically scales down to zero instances during idle periods to optimize costs, and avoids managing underlying server infrastructure or cluster control planes. Which compute architecture should you recommend?

Show answer & explanation

Answer: Deploy the containerized service to Google Cloud Run, configuring autoscaling with minimum instances set to zero.

Answer

Deploying the microservice to Google Cloud Run with minimum instances set to zero satisfies all functional and operational constraints by providing fully managed container execution, native HTTP/2 gRPC support, automatic scale-to-zero cost savings, and zero cluster administration.
Deploying to Cloud Run is the optimal architectural choice because it provides a fully managed, serverless execution environment for containerized workloads. It natively supports HTTP/2 and gRPC, automatically handles high request bursts, scales down to zero when traffic stops, and eliminates all cluster maintenance, OS patching, and control plane management.

Step-by-Step Solution

1
Analyze workload requirements
Identified stateless containerized microservices requiring HTTP/2 gRPC protocol support and extreme autoscaling responsiveness.
The compute platform must support standard container images and gRPC traffic without requiring application re-architecture.
2
Evaluate operational and financial constraints
The solution must eliminate cluster management overhead and scale down to zero instances during idle periods.
Managing Kubernetes control planes or virtual machine OS patches increases operational overhead, while running static instances during low-traffic periods incurs unnecessary costs.
3
Select optimal GCP compute platform
Cloud Run meets all operational, architectural, and financial requirements as a fully managed serverless container runtime.
Cloud Run natively ingests gRPC traffic over HTTP/2, scales seamlessly from zero to thousands of instances, and abstracts away infrastructure management completely.

Key Concept

Selecting Serverless Container Runtimes (Cloud Run) vs. Kubernetes (GKE) for Stateless Microservices
Estimated Time:2m 0s
Question 411Question

An infrastructure engineering team is establishing an automated deployment pipeline to execute Terraform configurations across multiple Google Cloud production projects. The architecture must enforce secure state management and strictly adhere to identity access management least-privilege guidelines. Which TWO configuration choices should the team implement?

Select all that apply

Show answer & explanation

Answer: Configure a Cloud Storage remote backend with object versioning enabled and utilize short-lived Service Account impersonation for pipeline authentication.; Enable native state locking on the backend storage bucket to prevent concurrent execution runs from causing state corruption.

Answer

The team should configure a Cloud Storage remote backend with object versioning enabled while utilizing short-lived Service Account impersonation for pipeline authentication, and enable native state locking on the backend storage bucket to prevent concurrent execution runs from causing state corruption.
Production enterprise deployments using Terraform on Google Cloud require a central remote state backend using Cloud Storage equipped with state locking and object versioning to protect against concurrent modification and state corruption. Additionally, authentication for automated pipelines must leverage short-lived credentials via service account impersonation rather than primitive IAM role assignments or static key files.

Step-by-Step Solution

1
Analyze secure state management requirements
Using Google Cloud Storage as a remote backend with versioning and object locking prevents state corruption and enables safe multi-developer/pipeline execution.
Storing state locally or in source control lacks lock controls and exposes sensitive resource metadata.
2
Analyze least-privilege security requirements
Service Account impersonation allows short-lived token generation, avoiding long-lived static JSON key management without relying on overly broad primitive IAM roles.
Granting primitive roles like Editor exposes excessive permissions beyond the necessary IaC scope.

Key Concept

Terraform Remote State Locking & Service Account Impersonation
Question 412Question

An enterprise organization is building a multi-region hybrid cloud environment on Google Cloud. The architecture consists of a Shared VPC network managed in a central host project with subnets provisioned in both `us-central1` and `europe-west1`. On-premises data centers connect to GCP via Dedicated Interconnect attachments in `us-central1`. The architecture team requires that on-premises workloads dynamically discover and route traffic to resources in both GCP regions over the Interconnect. Additionally, spoke workloads in service projects must access managed GCP services and external SaaS partners strictly through private IP addresses without traversing the public internet, while maintaining network isolation between independent spokes. Which TWO network topology configuration steps must you implement in the Shared VPC to satisfy these requirements? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Set the dynamic routing mode of the Shared VPC network to Global, and configure Cloud Routers in us-central1 to advertise subnet routes across both regions over BGP.; Configure Private Service Connect (PSC) endpoints using internal IP addresses in the Shared VPC subnets to route traffic privately to consumer endpoints and Google APIs.

Answer

The correct architecture requires setting the Shared VPC dynamic routing mode to Global so Cloud Routers in us-central1 can exchange routes for subnets in all regions (including europe-west1) over BGP, and provisioning Private Service Connect endpoints with internal IP addresses for private access to APIs and SaaS solutions.
To allow an on-premises data center connected via Dedicated Interconnect in one region (`us-central1`) to dynamically learn and route traffic to subnets in another region (`europe-west1`), the VPC network's dynamic routing mode must be configured to Global. Additionally, using Private Service Connect endpoints provisions internal IP addresses inside the Shared VPC subnets, allowing private, secure connectivity to Google APIs and managed SaaS services.

Step-by-Step Solution

1
Analyze dynamic routing requirements for multi-region Interconnect connectivity.
Regional dynamic routing only advertises local regional subnets. Setting dynamic routing to Global allows Cloud Router in us-central1 to advertise europe-west1 subnets over Interconnect BGP sessions.
On-premises systems need reachability to all GCP regional subnets across a single Interconnect connection.
2
Determine private access implementation for external services and Google APIs.
Deploy Private Service Connect (PSC) endpoints within Shared VPC subnets.
PSC endpoints allocate internal IP addresses in the consumer VPC, granting secure, private access to published services without public IP exposure or internet routing.
3
Evaluate and eliminate invalid topology design choices.
Reject VPC Peering transitivity assumptions, HA VPN replacement for 10Gbps Dedicated Interconnect, and Cloud NAT usage for private API access.
VPC Peering does not support transitive routing, HA VPN cannot match Dedicated Interconnect throughput, and Cloud NAT uses public egress routing.

Key Concept

Shared VPC Global Dynamic Routing and Private Service Connect Topology
Question 413Question

An operational engineering team is configuring Cloud Monitoring alerting policies for a fleet of Compute Engine virtual machines. They require alerts to trigger when memory utilization on any instance exceeds 80% for more than 10 minutes. However, when attempting to build the alert condition in the Cloud Monitoring console, the system memory utilization metric (agent.googleapis.com/memory/percent_used) is unavailable. Which action should the team take to enable this metric and successfully configure the alerting policy?

Show answer & explanation

Answer: Install and configure the Ops Agent on the Compute Engine instances to collect and report guest-OS system metrics to Cloud Monitoring.

Answer

Install and configure the Ops Agent on the Compute Engine instances to collect and report guest-OS system metrics to Cloud Monitoring.
Default Compute Engine metrics provided by the hypervisor only monitor external resource usage like CPU utilization and network throughput. Memory utilization is managed inside the guest operating system kernel. Installing the Ops Agent deploys a daemon inside the guest OS that continuously collects memory utilization data and pushes it to Cloud Monitoring under the metric namespace `agent.googleapis.com/memory/percent_used`.

Step-by-Step Solution

1
Identify why the target metric is missing in Cloud Monitoring.
Hypervisor-level monitoring only captures metrics visible from outside the VM (e.g., CPU utilization, network traffic, disk I/O). Detailed memory and internal disk utilization require in-guest metrics.
Cloud Monitoring cannot inspect guest OS RAM allocation without agent assistance.
2
Deploy the Google Cloud Ops Agent to the VM instances.
The Ops Agent gathers guest OS telemetry using OpenTelemetry for metrics and Fluent Bit for logging, publishing `agent.googleapis.com` metrics to Cloud Monitoring.
Installing the Ops Agent makes internal OS memory metrics accessible in Cloud Monitoring.
3
Construct the alerting policy using the newly available metric.
Configure the condition threshold for `agent.googleapis.com/memory/percent_used` exceeding 80% over a 10-minute duration.
With the metric populated, threshold condition evaluation functions as intended.

Key Concept

Compute Engine Guest-OS Telemetry & Ops Agent Monitoring
Question 414Question

An e-commerce organization is implementing an automated deployment pipeline to provision Compute Engine virtual machine instances for an order processing backend service. A dedicated custom service account was created to provide runtime permissions for the application on these instances. However, when the automated pipeline executes, instance creation fails with an IAM authorization error when trying to bind the custom service account to the virtual machines. Which configuration change should the cloud architect implement to resolve this provisioning error while adhering to the principle of least privilege?

Show answer & explanation

Answer: Grant the deployment pipeline service account the Service Account User role (roles/iam.serviceAccountUser) on the target custom service account.

Answer

Grant the deployment pipeline service account the Service Account User role (roles/iam.serviceAccountUser) on the target custom service account.
When an automated pipeline provisions Compute Engine virtual machines configured to run under a custom service account, the entity issuing the creation command must have permission to use that service account. Granting the `roles/iam.serviceAccountUser` role on the target service account permits the deployment pipeline to attach it to the virtual machine instances while strictly maintaining least privilege constraints.

Step-by-Step Solution

1
Identify the resource creation requirement
Creating Compute Engine instances attached to a custom service account requires the deployment identity to impersonate or pass that service account to the compute resource.
Google Cloud security controls require permission checks on both the compute provisioning API and the service account being attached.
2
Evaluate required IAM permissions against least privilege
The Service Account User role (roles/iam.serviceAccountUser) permits an identity to attach the service account to compute resources without granting full administrative privileges over IAM.
Granting roles/iam.serviceAccountUser restricted to the specific service account ensures minimal required access.

Key Concept

Compute Engine Service Account Attachment Permissions
Question 415Question

A healthcare analytics team is standardizing its Google Cloud deployment practices using Google Cloud Deployment Manager and HashiCorp Terraform. The cloud architect needs to enforce schema validation for Deployment Manager resource templates and prevent concurrency issues or race conditions when team members apply Terraform configurations simultaneously. Which TWO actions should the team implement to satisfy these operational requirements?

Select all that apply

Show answer & explanation

Answer: Include a explicit schema file alongside Deployment Manager Jinja2 or Python templates to enforce parameter types and required resource properties.; Configure a Google Cloud Storage (GCS) remote backend in Terraform configurations to store state centrally with state locking enabled.

Answer

The team should include a explicit `.schema` file alongside Deployment Manager templates to enforce parameter types and required properties, and configure a Google Cloud Storage remote backend in Terraform configurations to manage state centrally with automatic object locking.
To enforce input parameter validation and structure for Deployment Manager templates, creating explicit schema files (in JSON Schema format) alongside Jinja2 or Python templates validates configurations prior to provisioning. To safeguard Terraform infrastructure state across multi-developer or automated execution pipelines, configuring a Cloud Storage remote backend ensures centralized state management with automatic object locking, preventing concurrent state file updates.

Step-by-Step Solution

1
Analyze Deployment Manager template validation requirements
Identify that Cloud Deployment Manager supports `.schema` files (written in JSON Schema format) accompanying Jinja2 or Python templates to validate parameters and enforce required properties before deployment execution.
Schema files prevent invalid or malformed configurations from failing mid-deployment.
2
Evaluate Terraform remote state management best practices
Identify that configuring the `gcs` backend stores state in a Google Cloud Storage bucket with native state locking support.
Remote GCS backends prevent multiple concurrent runs from corrupting state through locking mechanisms.
3
Identify architectural antipatterns in remaining options
Reject storing state files on shared local/NFS disks and assigning primitive IAM Owner roles to execution service accounts.
Shared local storage causes state corruption, and primitive IAM roles violate least-privilege security controls.

Key Concept

Deployment Manager Schema Validation and Terraform GCS Remote State Locking
Question 416Question

A digital publishing platform is constructing an automated deployment pipeline using Infrastructure as Code (Terraform) to provision high-throughput compute infrastructure on Google Cloud. The architecture requires deploying a regional Managed Instance Group (MIG) of Compute Engine instances that will autoscale up to 500 N2 vCPUs during traffic bursts. The compute instances must execute using a dedicated workload service account with minimal privileges. Multiple DevOps engineers and automated CI/CD runners will execute Terraform deployments concurrently. Which provisioning design strategy should the Cloud Architect implement to meet these requirements securely and reliably?

Show answer & explanation

Answer: Configure a Cloud Storage backend with object versioning and state locking enabled, pre-emptively request a regional N2 vCPU quota increase, and grant the CI/CD pipeline service account the Service Account User role on the workload service account.

Answer

Configure a Cloud Storage backend with object versioning and state locking enabled, pre-emptively request a regional N2 vCPU quota increase, and grant the CI/CD pipeline service account the Service Account User role on the workload service account.
The correct option addresses all three critical requirements of enterprise compute provisioning: Cloud Storage remote backend with state locking prevents concurrent pipeline runs from corrupting IaC state; pre-emptively requesting regional vCPU quota increases prevents instance creation failures when the MIG autoscales up to 500 vCPUs; and assigning the Service Account User role allows the deployment pipeline to provision instances under the workload service account without granting excessive security permissions.

Step-by-Step Solution

1
Evaluate IaC state storage requirements for team and automated CI/CD concurrency.
Identify that Cloud Storage remote backends with object versioning and state locking (via Cloud Storage native locking) prevent state corruption and race conditions.
Local or unversioned state storage leads to concurrency conflicts and lost infrastructure state.
2
Assess compute provisioning quota limits for scaling workloads.
Determine that scaling to 500 N2 vCPUs requires verifying existing regional quotas and requesting an increase prior to deployment.
Default GCP regional compute quotas will block autoscaling MIG instance creation if not raised beforehand.
3
Determine the minimal IAM permissions needed for a deployment pipeline to attach a custom service account to compute instances.
Select the Service Account User role (roles/iam.serviceAccountUser).
This role allows the pipeline to impersonate or bind the service account to resources without granting administrative permissions over the service account itself.

Key Concept

Compute Resource Provisioning, Quotas, IaC State Management, and Service Account Security
Question 417Question

A cloud engineer needs to connect an on-premises data center to a Google Cloud Virtual Private Cloud (VPC) using a highly available VPN with dynamic route propagation. Which TWO of the following resources must be configured within Google Cloud to meet this requirement?

Select all that apply

Show answer & explanation

Answer: A Cloud Router deployed in the target VPC network and region to manage Border Gateway Protocol (BGP) sessions.; An HA VPN gateway configured with dual interfaces connected to IPsec VPN tunnels.

Answer

Deploying a Cloud Router in the target VPC region for dynamic BGP routing and provisioning an HA VPN gateway with dual interfaces linked to the Cloud Router are the two required configuration steps.
Establishing a high availability hybrid connection with dynamic routing in Google Cloud requires deploying an HA VPN gateway (which supplies dual active interfaces for tunnel redundancy) alongside a Cloud Router (which manages BGP sessions to exchange dynamic routes automatically with the on-premises gateway).

Step-by-Step Solution

1
Determine the requirement for dynamic route propagation.
Border Gateway Protocol (BGP) is required, which in Google Cloud is managed by Cloud Router.
Cloud Router dynamically exchanges subnets between the VPC and the on-premises router using BGP.
2
Determine the gateway requirement for highly available hybrid VPN connectivity.
An HA VPN gateway must be created with dual interfaces.
HA VPN supplies high-availability IPsec tunnels with SLA guarantees when both interfaces are properly connected.

Key Concept

Configuring HA VPN and Cloud Router for dynamic hybrid connectivity
Question 418Question

A multinational SaaS provider hosts a core analytics engine in a central GCP project's VPC network. Multiple independent enterprise customers need private, low-latency TCP connectivity from their own distinct GCP VPC networks to this central analytics engine. The customer VPC networks frequently have overlapping RFC 1918 internal IP address ranges with each other and with the service provider network. Furthermore, security policies require that customers must only have unidirectional access to initiate connections toward the analytics service, preventing any customer from reaching another customer's network or exposing the provider's internal topology. Which VPC networking design should you implement to satisfy these architecture requirements?

Show answer & explanation

Answer: Configure Private Service Connect endpoints in each customer VPC targeting a Service Attachment published in the analytics provider VPC behind an Internal HTTP(S) Load Balancer.

Answer

Configure Private Service Connect endpoints in each customer VPC targeting a Service Attachment published in the analytics provider VPC behind an Internal HTTP(S) Load Balancer.
The correct design uses Private Service Connect (PSC). PSC allows private service consumption across separate VPC networks even when IP addresses overlap. It allocates an endpoint IP inside the consumer VPC that maps directly to a producer Service Attachment behind an Internal Load Balancer, providing secure, low-latency, and strictly unidirectional service access without exposing raw network topologies.

Step-by-Step Solution

1
Analyze connectivity, IP overlap, and directionality requirements.
Identify that tenants have overlapping RFC 1918 IP addresses and require isolated, unidirectional connectivity to a centralized service.
VPC Network Peering cannot be used when IP CIDR blocks overlap across networks.
2
Evaluate Private Service Connect (PSC) capability for multi-tenant service publishing.
PSC abstracts the producer infrastructure by exposing service endpoints in consumer VPCs using consumer-assigned internal IP addresses.
PSC NAT translates connection packets automatically, resolving IP collision issues and restricting reachability to unidirectional service traffic.
3
Verify service attachment backend integration in the producer network.
Publishing the service attachment behind an Internal HTTP(S) Load Balancer or Internal Passthrough Network Load Balancer provides highly available backend routing.
This meets all architectural constraints around security isolation, low latency, IP overlap handling, and zero transitive route exposure.

Key Concept

Private Service Connect for Overlapping IP Networks and Service-Centric Publishing
Estimated Time:3m 0s
Question 419Question

An organization wants to host a stateless HTTP microservice on Google Cloud. The architecture team has established two strict operational constraints:
1. The compute platform must automatically scale down to zero instances during periods of no traffic to minimize idle costs.
2. The infrastructure must be fully serverless, requiring zero management or maintenance of underlying clusters or virtual machines.

Which TWO Google Cloud compute platforms meet these criteria?

Select all that apply

Show answer & explanation

Answer: Cloud Run; Cloud Functions

Answer

Cloud Run and Cloud Functions both provide fully managed serverless execution that automatically scales to zero instances when idle with zero infrastructure management overhead.
Cloud Run and Cloud Functions are both fully managed serverless compute services on Google Cloud. They automatically scale capacity based on incoming traffic volume, including scaling down to zero when no requests are actively being processed. This eliminates baseline compute costs during idle periods and requires no infrastructure provisioning, operating system patching, or cluster management.

Step-by-Step Solution

1
Identify operational requirements
The workload requires stateless HTTP execution, automatic scaling to zero when idle, and zero cluster or infrastructure management.
To evaluate candidate Google Cloud compute platforms against cost and operational overhead constraints.
2
Evaluate serverless compute platforms
Cloud Run and Cloud Functions natively scale down to zero instances during idle periods and eliminate server management.
Both offerings are fully managed GCP serverless platforms designed for stateless HTTP workloads.
3
Evaluate infrastructure-managed alternatives
Google Kubernetes Engine and Compute Engine Managed Instance Groups introduce node and VM management overhead and baseline compute costs.
These services do not satisfy the requirement for zero server management and native scale-to-zero compute behavior.

Key Concept

Serverless compute platform selection and scaling characteristics in Google Cloud.
Question 420Question

An global logistics enterprise is architecting an event-driven supply chain routing service on Google Cloud. The workload handles stateless HTTP webhook payloads containing container tracking events, which scale rapidly from zero during burst peak hours to thousands of requests per second. The application requires standard HTTP/2 transport and zero infrastructure management overhead. Additionally, the development team requires built-in automatic scaling to zero when no events are processing to minimize operational costs. Which two GCP compute platform design choices, when combined, fulfill these requirements with the lowest operational complexity?

Select all that apply

Show answer & explanation

Answer: Deploy the stateless web service as a fully managed Cloud Run containerized service.; Configure Cloud Run concurrency settings to allow multiple simultaneous requests per container instance.

Answer

Deploy the stateless web service as a fully managed Cloud Run service, and configure Cloud Run concurrency settings to process multiple simultaneous requests per container instance.
For stateless HTTP workloads that experience unpredictable burst traffic and require zero operational overhead alongside scale-to-zero capability, Cloud Run is the optimal Google Cloud platform. Enabling container concurrency further maximizes throughput and minimizes cost by allowing each running container instance to process multiple requests concurrently.

Step-by-Step Solution

1
Analyze workload state and scaling requirements
The application is a stateless HTTP microservice with bursty traffic patterns requiring scale-to-zero functionality and minimal management overhead.
Identifying statefulness and scaling characteristics determines whether serverless or container orchestration platforms are optimal.
2
Evaluate compute platforms against operational overhead constraints
Cloud Run provides serverless container hosting that automatically scales down to zero when idle and manages all underlying infrastructure.
Alternative platforms like GKE or Compute Engine MIGs introduce unnecessary management overhead and baseline execution costs for simple stateless webhooks.
3
Optimize throughput and cost efficiency for HTTP workloads
Configuring request concurrency on Cloud Run enables a single container instance to serve multiple concurrent HTTP connections efficiently.
Concurrency tuning reduces the number of container instances needed during sudden traffic spikes, lowering costs while maintaining responsiveness.

Key Concept

Selecting serverless compute platforms (Cloud Run) over container orchestrators (GKE) for stateless HTTP workloads requiring scale-to-zero and low operational overhead.
PreviousPage 21 / 80Next
All practice questions — Google Cloud Professional Cloud Architect | Examkin