All practice questions
1591 questions
A cloud engineer needs to enable Private Google Access on an existing subnetwork named `app-backend-subnet` located in the `us-east4` region. This is required so that Compute Engine instances without external IP addresses residing in this subnet can access Google Cloud APIs and services. Which `gcloud` command should the engineer run to modify the subnetwork settings correctly?
A security analyst is hardening a Cloud Storage bucket named `compliance-audit-logs` that currently permits fine-grained Access Control Lists (ACLs). The analyst needs to restrict access control exclusively to IAM policies across all current and future objects, while granting an internal compliance team view access to the stored logs. Which TWO actions should the security analyst perform to achieve this requirement? (Select TWO.)
Select all that apply
A DevOps engineer is investigating a potential data leak from a sensitive BigQuery dataset hosted in project `corp-analytics-prod`. The engineer runs a `gcloud logging read` command to inspect read operations recorded in Cloud Audit Logs. Although the engineer has been granted the Logs Viewer (`roles/logging.viewer`) role at the project level, the command execution returns no log entries for data read operations, returning only system Admin Activity logs. Which IAM role assignment adheres to the principle of least privilege while enabling the engineer to view these Data Access audit logs?
A financial firm enforces an Organization Policy at the root Organization node using the list constraint `constraints/sql.restrictPublicIp` to prevent Cloud SQL instances from being created with public IP addresses. A database team requires public IP access temporarily for instances created inside a specific folder named `Partner-Staging`. How should the administrator configure the governance controls on the `Partner-Staging` folder to allow public IP allocation for SQL instances inside that folder without affecting the rest of the organization?
A DevOps engineer needs to grant an external automation pipeline short-lived authorization to upload build artifacts to a Google Cloud Storage bucket in project `proj-prod` without using long-lived service account key files. The engineer decides to implement service account impersonation. What is the correct sequence of steps to configure and execute this secure delegation workflow?
Drag items to arrange them in the correct order
An engineer needs to resize a standalone Compute Engine virtual machine instance named `db-primary` to a larger machine type (`e2-standard-8`) to handle increased workload demand. The instance is currently in the RUNNING state and has a persistent disk attached. Which process must be used to successfully modify the machine type of this VM instance?
An organization is deploying Compute Engine VM instances with Customer-Managed Encryption Keys (CMEK) applied to their boot disks in the europe-west3 region. The deployment pipeline uses a dedicated deployment service account with the Cloud KMS Admin role (roles/cloudkms.admin) on the target Key Ring. When creating the instances, the pipeline fails with an authorization error stating that encryption could not be performed. Which action should a cloud engineer take to resolve this failure while maintaining the principle of least privilege?
A Cloud Engineer is managing a custom-mode Virtual Private Cloud (VPC) network. A subnet named `app-subnet-us-east1` in region `us-east1` currently has a primary IP range of `10.1.0.0/24`. Due to rapid application growth, the subnet is running out of available IP addresses. The engineer needs to expand the primary subnet IP range to accommodate at least 500 private IP addresses without disrupting existing running Compute Engine instances or recreating the subnet. Which `gcloud` command should the engineer execute?
An Associate Cloud Engineer needs to restore a corrupted secondary data disk attached to a standalone Compute Engine virtual machine named `prod-app-vm`. The engineer has an existing disk snapshot named `data-disk-snap-2026`. What is the correct sequence of steps to safely replace the corrupted disk with a restored disk from the snapshot?
Drag items to arrange them in the correct order
A cloud engineer is managing an existing External Application Load Balancer in Google Cloud. Monitoring reveals that healthy compute instances in the backend service are frequently marked as unhealthy during brief traffic spikes because the associated HTTP health check named prod-api-hc has an overly strict timeout setting. The engineer needs to modify prod-api-hc to increase the check interval to 15 seconds and the timeout duration to 10 seconds without recreating the resource. Which gcloud command should the engineer execute?
A Cloud Engineer is tasked with migrating an enterprise Cloud Storage bucket containing legacy internal archives from fine-grained Access Control Lists (ACLs) to Uniform Bucket-Level Access (UBLA) to comply with organization security policies. Place the administrative steps in the correct sequential order to perform this migration safely without disrupting user access.
Drag items to arrange them in the correct order
A cloud administrator needs to establish strict governance controls on a designated 'Production' Folder within the Google Cloud resource hierarchy. The requirements dictate that developers working inside projects under this folder must be prevented from generating long-lived service account JSON keys, and Compute Engine virtual machines must not be assigned public IP addresses. Which TWO configurations should the administrator apply to the 'Production' Folder to meet these security requirements? (Select TWO.)
Select all that apply
An enterprise security compliance reviewer needs to inspect Cloud Audit Logs for sensitive Compute Engine operations within a Google Cloud project named core-infrastructure-prod. The reviewer currently holds the predefined Logs Viewer (roles/logging.viewer) role at the project level. While they can inspect Admin Activity audit logs, they are unable to view sensitive payload details within Data Access audit logs. Following the principle of least privilege, which action will allow the reviewer to view the Data Access audit logs?
A security administrator is standardizing access controls on a Cloud Storage bucket named `financial-reports-archive` to align with organizational security guidelines. The bucket currently contains objects with legacy fine-grained Access Control Lists (ACLs), but company policy requires that all access be managed exclusively through Cloud IAM permissions. Which TWO configuration steps must the administrator perform to achieve this requirement following Google Cloud security best practices? (Select TWO.)
Select all that apply
A cloud security engineer needs to configure Cloud Audit Logging to capture object-level read events in Google Cloud Storage for project `prod-data-vault`, stream these logs into a central BigQuery dataset for compliance auditing, and grant access to the security analysis team. Arrange the implementation steps in the correct logical and technical sequence from start to finish.
Drag items to arrange them in the correct order
A cloud engineer needs to update an existing custom Virtual Private Cloud (VPC) network configuration in Google Cloud. The environment currently has a subnet `prod-subnet-uscentral1` with the primary IP range `10.1.0.0/24`. Due to rapid growth, the team needs to expand the primary IP address range of this existing subnetwork to `10.1.0.0/22` using the `gcloud` CLI without recreating the subnet or disrupting existing resources. Which of the following conditions and actions are required to successfully perform this subnet expansion? (Select TWO.)
Select all that apply
An infrastructure engineer needs to set up an isolated enterprise application environment in Google Cloud using the `gcloud` CLI. The setup requires creating a custom VPC network, provisioning a subnet with Private Google Access enabled, establishing an ingress firewall rule targeting a specific network tag, and launching a Compute Engine instance configured with that network tag.
In what order should the engineer execute these operational steps?
Drag items to arrange them in the correct order
An enterprise organization is establishing a security baseline for cryptographic operations using Google Cloud KMS across multiple GCP projects. The security team needs to enforce strict separation of duties, adhere to the principle of least privilege, and follow proper key management lifecycle practices. Which TWO of the following configurations or operational steps should the security team implement?
Select all that apply
A DevOps engineer manages an application deployed across a regional Managed Instance Group (MIG) on Compute Engine. The application process occasionally encounters application-level deadlocks where it stops responding to incoming HTTP traffic, even though the underlying virtual machine instance state remains RUNNING. The engineer needs to ensure that unresponsive instances are automatically detected and replaced without manual intervention. What should the engineer do?
An administrator notices that virtual machine instances in a private subnet are dropping outbound internet connections during peak traffic hours due to Cloud NAT port exhaustion. A second static regional IP address named `nat-ip-2` has already been allocated in region `us-central1`. The administrator must add `nat-ip-2` to the active Cloud NAT gateway `prod-nat` attached to Cloud Router `prod-router` in region `us-central1` without removing the existing assigned static IP `nat-ip-1`. Which `gcloud` command should the administrator execute?