All practice questions
1591 questions
A cloud operations team manages standalone Compute Engine VM instances hosting an enterprise web application. You need to configure the instances to send guest OS memory utilization metrics to Cloud Monitoring and ensure that the instances remain running without application downtime during scheduled infrastructure maintenance events. Which TWO actions should you perform? (Select 2 answers.)
Select all that apply
An organization wants to configure a GitHub Actions CI/CD pipeline to deploy Cloud Run services without exporting long-lived service account JSON keys. What is the correct sequential order of steps to establish Workload Identity Federation and service account impersonation for this setup?
Drag items to arrange them in the correct order
An engineer needs to deploy a containerized API microservice to Google Cloud Run using the gcloud CLI. The containerized application is configured to listen internally on custom TCP port 8085, and it must execute using a dedicated user-managed service account named [email protected] to adhere to least privilege permissions. Which TWO gcloud CLI configuration flags must be included in the deployment command to meet these requirements?
Select all that apply
You are managing identity configuration in a Google Cloud project with the ID `finance-analytics-prod`. You need to create a new user-managed service account named `app-scanner` to run an internal data inspection tool. Which TWO of the following statements regarding the creation and default attributes of this service account are correct?
Select all that apply
An enterprise security team requires an update to the firewall rule configuration of a custom Virtual Private Cloud (VPC) network named `prod-vpc`. Currently, an existing ingress firewall rule named `allow-web-internal` has a priority of `1000` and allows TCP port `8080` traffic from `10.1.0.0/16` to all instances in the network. The security team needs to immediately block all TCP port `8080` traffic originating specifically from the subnetwork `10.1.50.0/24`, while maintaining allowed access for all other IP addresses within `10.1.0.0/16`. Which firewall rule configuration should the Cloud Engineer implement to meet this requirement?
A cloud engineer is standardizing security controls across Google Cloud Storage buckets. The team recently enabled Uniform Bucket-Level Access on a bucket named `app-audit-logs` to comply with organization security policies. An automated deployment script now fails when executing `gcloud storage objects add-acl --object=daily_summary.json --rw-grant=...` to grant read access to a downstream processing account. What is the recommended operational fix to grant access while adhering to the security policy?
A cloud engineer is migrating an enterprise Cloud Storage bucket named `archival-reports-prod` to meet security audit compliance standards requiring Uniform Bucket-Level Access (UBLA). Previously, legacy applications relied on individual object Access Control Lists (ACLs) for read permissions. Immediately after the engineer enables UBLA on the bucket, a dedicated service account `[email protected]` receives HTTP 403 Access Denied errors when reading objects. The engineer must restore object read permissions for this service account while strictly maintaining UBLA enforcement. Which administrative action should the engineer take?
A DevOps team is deploying a new production Cloud Spanner instance named 'global-inventory-db' to support a multi-region transactional workload. The design specification mandates using the multi-region instance configuration 'nam-eur-asia1' and allocating a compute capacity of 1,000 processing units. Which TWO parameters are required when creating this instance using the gcloud CLI? (Select TWO.)
Select all that apply
An organization mandates that infrastructure deployments executed by developers from their local workstations to the production project `proj-landing-zone` must use short-lived credentials. Long-lived service account JSON keys are explicitly prohibited by organizational policy. A dedicated service account `[email protected]` has already been assigned all necessary resource management permissions in `proj-landing-zone`. To enable developers to execute `gcloud auth application-default login --impersonate-service-account=sa-terraform-deployer@proj-landing-zone.iam.gserviceaccount.com` without granting them direct permissions to modify resources in the project, which IAM configuration is required?
An enterprise data team is configuring IAM permissions for an automated data processing service account. The service account needs to execute BigQuery query jobs and modify table contents only within a single project named `analytics-warehouse-prod`. Security policy mandates strict adherence to the principle of least privilege while preventing permission inheritance across adjacent production projects. Which IAM role assignment strategy should you use?
An event-driven microservice deployed in Google Cloud needs to publish telemetry messages to a specific Cloud Pub/Sub topic named `device-telemetry-topic` in the project `iot-ingestion-prod`. The microservice should only be granted permissions to publish messages to this specific topic and must not be allowed to create topics, modify subscriptions, or access other resources in the project. Which access control configuration adheres to the principle of least privilege?
A Cloud Engineer is managing a stateless web application running on a Google Kubernetes Engine (GKE) Standard cluster. To maintain performance during peak usage, the application must automatically scale its pod replica count whenever average CPU usage exceeds 75%. Additionally, if pods enter a Pending state due to insufficient compute capacity in the cluster, the underlying GKE node pool must automatically provision additional Compute Engine instances. Which TWO actions should the engineer perform to fulfill these operational requirements? (Select TWO.)
Select all that apply
A Cloud Engineer needs to perform a Point-in-Time Recovery (PITR) for a Cloud SQL instance after a developer accidentally dropped a critical database table. What is the correct operational sequence of steps to safely restore the database state and transition application traffic to the restored instance?
Drag items to arrange them in the correct order
A cloud engineer is managing a Google Cloud Storage bucket that contains confidential audit records. To enforce organization-wide security policies, Uniform Bucket-Level Access was recently enabled on the bucket. However, external auditors report that they can no longer view specific objects that were previously accessible via fine-grained object Access Control Lists (ACLs). You need to restore the auditors' read access while maintaining compliance with the uniform access mandate. What should you do?
A cloud administrator is planning to enforce security restrictions across Google Cloud resources by applying Organization Policy constraints at the Organization level. Which of the following statements correctly describe the behavior and evaluation of Organization Policies in the resource hierarchy? (Select TWO.)
Select all that apply
A security lead mandates that developers executing maintenance scripts from their local workstations must access BigQuery datasets as the target service account [email protected] without downloading service account keys. Which of the following configurations are required to establish valid service account impersonation for the developer account [email protected]? (Select TWO correct answers.)
Select all that apply
An administrator needs to ensure that access to all objects in a Google Cloud Storage bucket is managed strictly through Cloud IAM permissions, completely disabling individual per-object Access Control Lists (ACLs). Which configuration should the administrator apply to the bucket?
An organization runs an asynchronous media rendering service on a Compute Engine Managed Instance Group (MIG) that scales dynamically using CPU utilization metrics. During peak operational hours, brief, intermittent drops in CPU usage cause the autoscaler to prematurely terminate VM instances that are still processing long-running rendering tasks. You need to prevent premature instance termination during transient CPU fluctuations while maintaining automated horizontal scaling capabilities. Which configuration change should you make following Google-recommended best practices?
A cloud administration team needs to securely provision a Compute Engine virtual machine instance that automatically executes a startup script stored in a private Google Cloud Storage bucket. Place the operational steps in the correct order to successfully deploy and verify this virtual machine workload.
Drag items to arrange them in the correct order
An organization maintains two Virtual Private Cloud (VPC) networks in Google Cloud: a central network named `hub-vpc` and a workload network named `spoke-vpc`. The two networks are connected using VPC Network Peering via a peering connection named `peering-hub-to-spoke` created on `hub-vpc`. The workload team recently added custom static routes in `spoke-vpc` and enabled custom route exporting on their peering end. However, virtual machines in `hub-vpc` cannot route traffic to those custom destinations because `hub-vpc` is not receiving the advertised routes. Which `gcloud` command should the cloud engineer execute to configure `hub-vpc` to receive the exported custom routes from `spoke-vpc`?