Google Associate Cloud Engineer Practice Test 28

Question 270

Two VPCs are already peered, but one peer cannot reach a private on-premises network learned through Cloud Router in the other VPC. The team wants eligible custom routes exchanged across the peering. What must be checked?

  1. Enable a global external Application Load Balancer
  2. Turn on public IP addresses for all VMs
  3. Configure custom-route import and export on the peering connections as applicable
  4. Replace the peering with a Cloud Storage bucket

Explanation

Correct Answer

C:

VPC Network Peering can exchange eligible custom routes when the relevant import/export settings are enabled and destination CIDR and route constraints permit the path.

Incorrect Answers

A:

An external layer-7 load balancer routes HTTP traffic to backend services; it does not govern the import or export of learned custom routes over a VPC Network Peering connection.

B:

Public addresses are unrelated to peering route exchange, and enabling them could undermine the required private path to on-premises networks.

D:

Object storage is not a routed network connection and cannot relay a VPC’s private on-premises IP routes to another peered network.

Question 271

Security must discover which nonhuman identities still have user-managed private keys and plan their removal. What should be inventoried?

  1. Use service account description and display name
  2. Use service account impersonation audit trail
  3. Audit service-account key inventory
  4. Avoid exporting service account keys

Explanation

Correct Answer

C:

Service-account key listings expose user-managed key metadata, which can be audited and managed; for the stated workload, the practical result is finding long-lived service account credentials.

Incorrect Answers

A:

Service accounts have descriptive metadata fields that support inventory and operational ownership reviews; its purpose differs: documenting service-account ownership and purpose is separate from finding long-lived service account credentials.

B:

Relevant audit logs for IAM Credentials operations can attribute supported credential issuance under appropriate logging configuration; that supports tracking requests to the IAM Credentials API; the problem to solve concerns finding long-lived service account credentials.

D:

Managed service-account credentials are generally safer than downloadable private keys because the platform supplies short-lived tokens; its purpose differs: using workload-attached credentials instead of embedded secrets is separate from finding long-lived service account credentials.

Question 272

A deployment account is used by multiple authorized CI pipelines and investigators need records of credentials generation. Which trail helps?

  1. Use signed URL delegation with service account
  2. Grant service account token creator
  3. Use service account impersonation audit trail
  4. Use service account IAM on target bucket

Explanation

Correct Answer

C:

Relevant audit logs for IAM Credentials operations can attribute supported credential issuance under appropriate logging configuration; it supports tracking requests to the IAM Credentials API at the appropriate resource scope.

Incorrect Answers

A:

Authorized service account signing can generate Cloud Storage signed URLs for temporary operation-specific access; that mechanism handles signing controlled object access requests; it does not configure tracking requests to the IAM Credentials API.

B:

Service Account Token Creator enables supported token or signature operations for a target service account; this governs delegating service-account token generation, whereas the stated objective is tracking requests to the IAM Credentials API.

D:

Bucket-level role binding can grant object permissions to a workload without broad project-wide storage access; the scenario specifies tracking requests to the IAM Credentials API, which differs from restricting a workload principal to one data resource.

Question 273

An external CI runner uses OIDC federation into Google Cloud. Its configuration file describes token exchange with a workload identity pool and contains no private-key material. What credential file format is the supported keyless integration using?

  1. A service-account JSON private key downloaded from IAM
  2. A Cloud Storage HMAC access key pair
  3. An OAuth refresh token copied from a personal browser session
  4. An external-account credential configuration for Workload Identity Federation

Explanation

Correct Answer

D:

External-account credential configurations direct supported client libraries or tools to acquire an external subject token and exchange it through a configured workload identity provider, without a service-account private key.

Incorrect Answers

A:

A private-key JSON grants signing ability through long-lived secret material; OIDC workload federation is specifically designed to avoid distributing such keys.

B:

HMAC keys authenticate selected Cloud Storage requests and are not the external OIDC subject-token exchange configuration needed for workload federation.

C:

Personal refresh tokens are not the intended machine trust mechanism for short-lived external workload identities and create credential handling risk.

Question 274

Pods within a cluster need separate Kubernetes-native identities for workload authorization decisions. Which Kubernetes object should be specified?

  1. Grant Cloud Run Invoker
  2. Use GKE Kubernetes service accounts
  3. Use Workload Identity Federation
  4. Use service account impersonation with gcloud

Explanation

Correct Answer

B:

Kubernetes ServiceAccounts identify workloads to the Kubernetes API and can participate in GKE workload identity integrations; this is the specific mechanism used for distinguishing Pod identities inside Kubernetes.

Incorrect Answers

A:

Cloud Run Invoker grants permission to invoke eligible Cloud Run services subject to authentication and ingress controls; that supports authorizing HTTP invocation of a private service; the problem to solve concerns distinguishing Pod identities inside Kubernetes.

C:

Workload Identity Federation exchanges eligible external workload identities for short-lived Google Cloud credentials; Applying it would target federating non-Google workload credentials, leaving the separate need for distinguishing Pod identities inside Kubernetes.

D:

Gcloud supports service-account impersonation flags to request short-lived credentials when authorized; this governs using controlled per-command service-account impersonation, whereas the stated objective is distinguishing Pod identities inside Kubernetes.

Question 275

A Cloud SQL for PostgreSQL instance has point-in-time recovery enabled. A destructive statement ran at 14:12, and the team needs the database state from 14:10 rather than the most recent scheduled backup. What recovery method should they choose?

  1. Restore to a specified timestamp using point-in-time recovery
  2. Restore only the latest scheduled backup
  3. Create a read replica from the damaged primary
  4. Increase the database storage allocation

Explanation

Correct Answer

A:

PITR uses available backup and transaction-log history to recover the database to a selected supported time. It creates a new Cloud SQL instance containing the recovered state.

Incorrect Answers

B:

A scheduled backup provides a particular backup state. It may precede 14:10 by hours and does not select the desired second-level point in time.

C:

A newly created replica follows the source data state and does not reverse an already committed destructive transaction to an earlier timestamp.

D:

Adding capacity addresses disk-size pressure; it neither undoes the destructive statement nor restores a historical database state.

Question 276

Newly created projects must be included in centrally managed logging without configuring a sink in each one. What logging scope supports this?

  1. Use Cloud Monitoring workspace scope
  2. Use Cloud Logging setup
  3. Use Cloud Trace
  4. Use an organization log sink

Explanation

Correct Answer

D:

Aggregated sinks at suitable resource ancestors can route descendant logs subject to sink configuration and permissions; its effect directly addresses centralizing log routing across descendant projects.

Incorrect Answers

A:

Cloud Monitoring metrics scopes can make data from multiple monitored projects accessible in one scoping project; its purpose differs: establishing multi-project metric visibility is separate from centralizing log routing across descendant projects.

B:

The alternative would address centralizing and querying operational logs; Cloud Logging ingests and organizes supported resource and application logs into log buckets and views; the question instead requires centralizing log routing across descendant projects.

C:

Cloud Trace collects and visualizes distributed request traces and span timings; it concerns locating slow segments in distributed calls, and its normal effect does not provide centralizing log routing across descendant projects.

Question 277

A public-facing instance must accept HTTPS requests only on TCP 443 from selected source ranges. Which firewall control fits?

  1. Use firewall logging
  2. Use Cloud NGFW hierarchical firewall policies
  3. Use VPC firewall ingress allow
  4. Use firewall target service accounts

Explanation

Correct Answer

C:

Ingress allow rules permit matching incoming connections to specified targets subject to higher-priority policies; its effect directly addresses opening a targeted inbound network flow.

Incorrect Answers

A:

Firewall Rules Logging produces supported connection records for traffic matching enabled rules; its purpose differs: capturing matched firewall traffic metadata is separate from opening a targeted inbound network flow.

B:

Hierarchical firewall policies apply ordered network security rules from organization or folder associations; the scenario specifies opening a targeted inbound network flow, which differs from enforcing inherited network firewall policies.

D:

VPC firewall rules can use supported service-account selectors to identify target VM interfaces; that supports targeting firewall traffic by workload identity; the problem to solve concerns opening a targeted inbound network flow.

Question 278

A zonal cluster is an avoidable failure point for a high-availability service. What GKE location choice should be considered?

  1. Choose GKE Autopilot
  2. Choose GKE Standard
  3. Use Workload Identity Federation for GKE
  4. Use a GKE regional cluster

Explanation

Correct Answer

D:

The scenario depends on using a regionally distributed Kubernetes cluster; Regional GKE clusters replicate supported control-plane and node components across multiple zones.

Incorrect Answers

A:

GKE Autopilot automates many cluster and node infrastructure tasks while retaining Kubernetes workload interfaces; it concerns deploying Kubernetes workloads without self-managed node pools, and its normal effect does not provide using a regionally distributed Kubernetes cluster.

B:

GKE Standard runs Kubernetes with user-managed node pools and more infrastructure configuration control; the scenario specifies using a regionally distributed Kubernetes cluster, which differs from operating configurable Kubernetes node pools.

C:

For mapping Pod identities to Google Cloud permissions, this could be relevant; Workload Identity Federation for GKE provides identity federation for workloads to access Google Cloud APIs; the actual request concerns using a regionally distributed Kubernetes cluster.

Question 279

An organization needs governed key-value attributes usable in supported IAM conditions and firewall policy matching. What should it configure?

  1. Use Cloud Asset Inventory
  2. Use Resource Manager tags
  3. Set an organization policy at the folder
  4. Use labels on supported resources

Explanation

Correct Answer

B:

The scenario depends on assigning governed tags for policy decisions; Resource Manager tags are centrally defined key-value bindings with policy integrations distinct from ordinary labels.

Incorrect Answers

A:

For searching a centralized cloud asset inventory, this could be relevant; Cloud Asset Inventory indexes supported Google Cloud resource and policy metadata for search, analysis and exports; the actual request concerns assigning governed tags for policy decisions.

C:

A policy attached at a folder is inherited by descendants according to constraint rules without affecting unrelated sibling branches; that mechanism handles targeting the restriction to one hierarchy branch; it does not configure assigning governed tags for policy decisions.

D:

This alternative focuses on classifying supported resources with key-value labels; Labels are user-defined key-value metadata for organization and billing analysis and are not hierarchical IAM boundaries; the stem instead asks for assigning governed tags for policy decisions.

Question 280

A stateless API has unpredictable bursts and should scale down when unused. Which compute offering best fits?

  1. Choose GKE Autopilot
  2. Choose Compute Engine VMs
  3. Choose Cloud Run services
  4. Use batch jobs on Google Cloud Batch

Explanation

Correct Answer

C:

Cloud Run hosts container services with managed request routing and configurable instance scaling; this is the specific mechanism used for scaling containerized request workloads automatically.

Incorrect Answers

A:

GKE Autopilot automates many cluster and node infrastructure tasks while retaining Kubernetes workload interfaces; it concerns deploying Kubernetes workloads without self-managed node pools, and its normal effect does not provide scaling containerized request workloads automatically.

B:

Compute Engine provides infrastructure virtual machines with guest OS control and configurable attached storage; that supports running a customizable guest operating system; the problem to solve concerns scaling containerized request workloads automatically.

D:

Google Cloud Batch schedules and executes batch workloads on managed Compute Engine resources; Applying it would target orchestrating finite parallel batch jobs, leaving the separate need for scaling containerized request workloads automatically.

Associate Cloud Engineer Practice Tests