Google Associate Cloud Engineer Practice Test 66

Question 650

A Compute Engine instance needs to call Cloud Storage APIs using its runtime identity. Which VM setting should be configured?

  1. Attach a service account to a VM
  2. Grant target resource role to service account
  3. Create a dedicated service account
  4. Disable unused service account
  5. Use Application Default Credentials on Google Cloud

Explanation

Correct Answer

A:

The requirement is assigning workload identity to a compute instance; VMs can run as attached service accounts, with tokens available through the metadata server subject to access settings.

Incorrect Answers

B:

Attaching an account establishes identity but the service account still needs IAM permissions on the resources it accesses; its operational role is granting the workload identity the required API permissions; the needed capability is assigning workload identity to a compute instance.

C:

Dedicated service accounts provide separate nonhuman identities for workloads and make IAM grants auditable; its purpose differs: isolating workload authorization from user credentials is separate from assigning workload identity to a compute instance.

D:

Disabling a service account blocks its use without immediately deleting the identity and associated metadata; the scenario specifies assigning workload identity to a compute instance, which differs from disabling an unneeded service account.

E:

Application Default Credentials allows libraries to discover the runtime's supported identity credentials; it concerns using platform-discovered workload credentials, and its normal effect does not provide assigning workload identity to a compute instance.

Question 651

A service-account inventory has opaque email identifiers and platform staff need quick human-readable context. What metadata helps?

  1. Use service-account-level IAM policy
  2. Use service account description and display name
  3. Use service account authentication without downloaded keys
  4. Use service account delegation chain

Explanation

Correct Answer

B:

Service accounts have descriptive metadata fields that support inventory and operational ownership reviews; the decisive property here is providing understandable account labels and descriptions.

Incorrect Answers

A:

A service account is an IAM resource with its own allow policy for controlling who can use or manage it; that solves problems involving scoping impersonation permissions to the target account, rather than the providing understandable account labels and descriptions requirement.

C:

Attached service accounts and the platform metadata service supply refreshed short-lived credentials to supported workloads; it is appropriate for using default platform-supplied tokens; here, the deciding requirement is providing understandable account labels and descriptions.

D:

IAM Credentials supports delegated impersonation chains when each principal has required token creation permissions; this is a distinct control for delegating identity through authorized account hops, rather than providing understandable account labels and descriptions.

Question 652

GKE pulls from a private container repository but receives authorization errors before application Pods start. Which identity needs repository read rights?

  1. Use separate build and runtime service accounts
  2. Use Cloud Run runtime identity permission checks
  3. Grant Artifact Registry reader to node identity
  4. Bind GKE workload identity to IAM

Explanation

Correct Answer

C:

GKE image pulls use eligible node or configured credential identities that need Artifact Registry read permissions; this corresponds to authorizing image retrieval during Pod startup, not a separate lifecycle action.

Incorrect Answers

A:

Deployment and runtime service accounts serve different functions and can receive separate tailored IAM roles; that applies to separating deployment authority from application data access; the requested task is authorizing image retrieval during Pod startup.

B:

The alternative would address checking runtime principal privileges rather than developer grants; Production API authorization follows the workload's attached service account, not the developer's personal IAM roles; the question instead requires authorizing image retrieval during Pod startup.

D:

For connecting GKE workload identity to cloud IAM permissions, this could be relevant; Workload Identity Federation for GKE establishes workload identities that receive supported IAM access without embedded private keys; the actual request concerns authorizing image retrieval during Pod startup.

Question 653

Two rules match SSH traffic with conflicting actions, and administrators need to know which one wins. What firewall attribute matters?

  1. Use firewall logging
  2. Use firewall priority evaluation
  3. Use VPC firewall ingress allow
  4. Use Cloud NGFW secure tags

Explanation

Correct Answer

B:

Firewall policy priority and evaluation hierarchy determine which matching action takes effect; that matches the requirement for diagnosing ordered network security rule evaluation.

Incorrect Answers

A:

For capturing matched firewall traffic metadata, this could be relevant; Firewall Rules Logging produces supported connection records for traffic matching enabled rules; the actual request concerns diagnosing ordered network security rule evaluation.

C:

For opening a targeted inbound network flow, this could be relevant; Ingress allow rules permit matching incoming connections to specified targets subject to higher-priority policies; the actual request concerns diagnosing ordered network security rule evaluation.

D:

Secure Tags are resource-manager tags usable in supported Cloud NGFW policy targeting; the decision here is about diagnosing ordered network security rule evaluation, not selecting network targets using governed security tags.

Question 654

A Kubernetes application uses a private third-party OCI image registry rather than Artifact Registry. Nodes can reach the registry, but the registry requires a username and token. How should the Pod supply image-pull credentials?

  1. Grant the node Google Cloud Billing Viewer
  2. Disable image pull authentication on the deployment
  3. Create a Kubernetes registry Secret and reference it with imagePullSecrets
  4. Add the Artifact Registry Reader role to a GKE service account

Explanation

Correct Answer

C:

A docker-registry-type Secret can hold supported credentials for the external image registry. Linking the Secret through imagePullSecrets lets Kubernetes authenticate image pulls for that Pod.

Incorrect Answers

A:

A billing role has no authority at the external container registry. Google Cloud project IAM cannot replace the registry-specific login credentials required to pull that image.

B:

Disabling registry authentication does not make a private image publicly accessible and would not meet the private registry security requirement.

D:

The Artifact Registry Reader role applies to Google Artifact Registry repositories and does not automatically authorize access to a separately operated third-party OCI registry.

Question 655

Development VMs should shut down outside office hours to avoid unnecessary compute charges. What Compute Engine automation helps?

  1. Use VM reservation
  2. Use an instance schedule
  3. Use Sole-Tenant Nodes
  4. Use Shielded VM

Explanation

Correct Answer

B:

Instance schedules can automate starts and stops for eligible Compute Engine VM instances; this is the capability needed for scheduling regular VM start and stop behavior.

Incorrect Answers

A:

Compute Engine reservations allocate qualifying VM capacity in a zone independently of starting instances; its operational role is reserving zonal VM capacity for a deployment; the needed capability is scheduling regular VM start and stop behavior.

C:

The alternative would address reserving isolated physical host tenancy; Sole-tenant nodes provide dedicated physical servers for a customer's eligible VM workloads; the question instead requires scheduling regular VM start and stop behavior.

D:

The alternative would address enforcing supported VM boot protections; Shielded VM provides capabilities such as Secure Boot, virtual TPM and integrity monitoring; the question instead requires scheduling regular VM start and stop behavior.

Question 656

A CI runner and a developer laptop must not maintain conflicting independent local state copies. Which state setup is appropriate?

  1. Use a Terraform provider
  2. Use Terraform drift detection
  3. Use remote Terraform state storage
  4. Run terraform apply

Explanation

Correct Answer

C:

What matters is sharing Terraform state safely between operators; A remote backend such as a protected Cloud Storage bucket can centralize Terraform state for collaborative workflows.

Incorrect Answers

A:

The Google Terraform provider maps supported resource schemas to Google Cloud API operations; that mechanism handles declaring cloud-specific Terraform functionality; it does not configure sharing Terraform state safely between operators.

B:

Terraform planning and refresh behavior can reveal discrepancies between configured and remote resource state; its purpose differs: detecting manually introduced infrastructure configuration drift is separate from sharing Terraform state safely between operators.

D:

Terraform apply performs authorized resource changes described by the configuration or saved plan; that mechanism handles executing declared infrastructure updates; it does not configure sharing Terraform state safely between operators.

Question 657

A Cloud SQL for MySQL read replica serves stale results. The primary is healthy, but the replica is slowly applying the primary's changes. Which monitoring measurement most directly quantifies the time by which the replica trails the primary?

  1. Primary instance count
  2. Cloud Storage retrieval latency
  3. Cloud SQL replica_lag metric
  4. Compute Engine live migration events

Explanation

Correct Answer

C:

The replica_lag metric reports the lag in seconds between the source transaction timing and what the read replica has applied. It is directly relevant to stale reads on the replica.

Incorrect Answers

A:

The number of database instances is a topology measure and gives no indication of how recently the replica has replayed changes originating on the primary.

B:

Object retrieval latency measures a different product and cannot tell whether a Cloud SQL replica is behind on transaction application.

D:

Host live-migration events do not directly quantify asynchronous database replication delays, which can occur even while instances remain healthy.

Question 658

An operator needs to execute one permitted command as a deployment identity while remaining logged in as themselves. What CLI option fits?

  1. Use GKE Kubernetes service accounts
  2. Use Workload Identity Federation
  3. Use service account impersonation with gcloud
  4. Use IAM Credentials API

Explanation

Correct Answer

C:

The scenario depends on temporarily running a command under service-account identity; Gcloud supports service-account impersonation flags to request short-lived credentials when authorized.

Incorrect Answers

A:

Kubernetes ServiceAccounts identify workloads to the Kubernetes API and can participate in GKE workload identity integrations; that supports distinguishing Pod identities inside Kubernetes; the problem to solve concerns temporarily running a command under service-account identity.

B:

Workload Identity Federation exchanges eligible external workload identities for short-lived Google Cloud credentials; that supports accessing cloud APIs from external CI without key files; the problem to solve concerns temporarily running a command under service-account identity.

D:

The IAM Credentials API generates supported short-lived service account tokens and signatures for authorized callers; Applying it would target requesting limited-lifetime credentials programmatically, leaving the separate need for temporarily running a command under service-account identity.

Question 659

A provisioning team needs the same result on every repeatable deployment, and wants configuration files to state the intended final resources. Which style fits?

  1. Use a declarative desired-state configuration
  2. Use Kubernetes Config Connector
  3. Use Terraform modules
  4. Use Cloud Foundation Toolkit

Explanation

Correct Answer

A:

Declarative infrastructure configuration specifies intended resources while tooling computes the necessary changes; that matches the requirement for describing target infrastructure state rather than click sequences.

Incorrect Answers

B:

Config Connector exposes supported Google Cloud services as Kubernetes custom resources and reconcilers; the scenario specifies describing target infrastructure state rather than click sequences, which differs from using a Kubernetes control plane for cloud configuration.

C:

Terraform modules encapsulate resource definitions and input/output interfaces for reuse; it concerns packaging reusable resource configurations, and its normal effect does not provide describing target infrastructure state rather than click sequences.

D:

Cloud Foundation Toolkit provides modules and examples for automated Google Cloud foundation deployments; it concerns bootstrapping reusable foundation infrastructure, and its normal effect does not provide describing target infrastructure state rather than click sequences.

Question 660

A reporting team needs a portable SQL dump or supported export file saved to a bucket. What database operation fits?

  1. Use Firestore scheduled backups
  2. Use Cloud SQL Enterprise Plus index advisor
  3. Use Database Center
  4. Check Cloud SQL connection limits
  5. Use Cloud SQL export to Cloud Storage

Explanation

Correct Answer

E:

Cloud SQL export writes supported database export formats to authorized Cloud Storage destinations; it supports exporting Cloud SQL content to object storage at the appropriate resource scope.

Incorrect Answers

A:

Firestore scheduled backups support daily or weekly database snapshots and restoration to a new database while retaining configurable backup copies; it would help with creating scheduled recovery snapshots for Firestore, but it does not directly implement exporting Cloud SQL content to object storage.

B:

Cloud SQL index advisor generates index recommendations on supported Enterprise Plus instances with the required Query Insights features enabled; that mechanism handles finding query-driven index creation recommendations; it does not configure exporting Cloud SQL content to object storage.

C:

The alternative would address observing a fleet of cloud databases; Database Center offers fleet-level information and insights for supported Google Cloud database services; the question instead requires exporting Cloud SQL content to object storage.

D:

For aligning client concurrency with database connection capacity, this could be relevant; Cloud SQL and underlying database engines have connection capacity considerations requiring pooling and appropriate instance sizing; the actual request concerns exporting Cloud SQL content to object storage.

Associate Cloud Engineer Practice Tests