All practice questions
1591 questions
A cloud engineer is deploying a custom-mode Virtual Private Cloud (VPC) network named `prod-vpc` to host a secure tier of web application instances in Google Cloud. The deployment specification requires creating a custom subnet named `prod-subnet-us`, defining an ingress firewall rule named `allow-prod-web` restricted to target network tag `web-frontend`, and launching a Compute Engine VM instance named `app-server-1` attached to the new subnet with the matching target tag. What is the correct chronological sequence of gcloud CLI commands to successfully provision this complete network infrastructure from scratch?
Drag items to arrange them in the correct order
A junior administrator needs to check the status and configuration details of Compute Engine virtual machine instances within a specific Google Cloud project. The administrator must not be allowed to perform administrative tasks, create new instances, or stop running virtual machines. To comply with the principle of least privilege, which IAM role should you grant to the administrator at the project level?
A security team grants an auditor the Storage Object Viewer role (`roles/storage.objectViewer`) at the Google Cloud Organization resource level. Later, a project administrator attempts to restrict this access by removing the auditor's role assignment from a specific project's IAM policy within that organization. Which outcome occurs when the auditor attempts to read an object in a Cloud Storage bucket inside that project?
A Cloud Engineer is tasked with deploying a containerized microservice to Google Cloud Run from local source code while enforcing security best practices and least privilege. Place the following deployment steps in the correct chronological order from first to last.
Drag items to arrange them in the correct order
A cloud engineer is managing a stateless application on a Google Kubernetes Engine (GKE) cluster. The application needs to read data from a Google Cloud Storage bucket securely. To adhere to Google Cloud security best practices, the application must authenticate without using long-lived service account key files stored inside Kubernetes secrets or container images. Which approach should the engineer implement?
A cloud operations team manages a Google Cloud Storage bucket containing regulatory financial records. To satisfy strict compliance requirements, all uploaded records must remain unmodified and undeletable for a mandatory retention duration of five years. The team has already set a retention period of 1,825 days on the bucket. Now, they must ensure that no user—including administrators and project owners—can reduce the retention period or remove the policy. Which operational action must the engineer perform to fulfill this requirement?
An organization is onboarding a database maintenance specialist who requires full operational control over Cloud SQL database instances—including modifying instance flags, restarting instances, and creating backups—within a target project named `finance-prod`. To satisfy strict compliance policies, the specialist must not be granted permissions to modify VPC network settings, manage project-level access controls, or access resources in adjacent environment projects. Which IAM role assignment strategy correctly fulfills these operational requirements while adhering to the principle of least privilege?
An enterprise media streaming platform is architecting its storage and database tier on Google Cloud. Match each technical workload requirement to the most appropriate Google Cloud database service or block storage option.
Click a left item, then click its matching right item
Items
Matches
A Cloud Engineer needs to migrate an existing standalone, stateful Compute Engine VM instance named 'prod-db-node' and its boot persistent disk from zone us-central1-a to zone us-central1-b due to a planned zone retirement. The database engine requires complete data consistency prior to taking storage backups. Which sequence of gcloud CLI actions correctly performs this zonal migration while ensuring data integrity?
Drag items to arrange them in the correct order
A Cloud Engineer is setting up an automated Google Cloud infrastructure deployment process using Terraform. To follow Google Cloud security and operational best practices, the engineer must ensure that team members can collaborate without state file conflicts and that deployment processes do not rely on static, long-lived authentication keys. Which two actions should the engineer take to achieve this configuration?
Select all that apply
A cloud engineer needs to configure Private Service Access and deploy a Cloud SQL PostgreSQL database instance with Private IP connectivity in a custom Virtual Private Cloud (VPC) network using the `gcloud` command-line interface. Sequence the required steps in the correct chronological order from first to last.
Drag items to arrange them in the correct order
An analytics team needs to grant access to an automated reporting tool's service account. The service account must execute SQL query jobs in the project `proj-analytics-prod` and read table data exclusively from a specific BigQuery dataset named `ds_finance`. Following the principle of least privilege, which combination of IAM role assignments should you configure?
A database compliance auditor needs to inspect table schemas and execute read-only queries against a Cloud Spanner database named `inventory-db` within the production project `retail-prod`. The auditor must not have permissions to modify data, alter schemas, or access unrelated GCP resources in the project. Adhering to the principle of least privilege, which IAM role configuration should you grant to the auditor?
An organization is deploying a global public web application on Google Cloud Compute Engine. The application serves static web assets (such as images and scripts) as well as dynamic web endpoints over HTTPS. The networking team needs to reduce load times for static assets by caching them near end users worldwide, and they must configure public DNS resolution for their custom domain using geo-based traffic steering to direct users to regional backend entry points. Which TWO of the following configuration choices should the team implement to satisfy these requirements?
Select all that apply
An infrastructure team manages a production Cloud Run service named `data-processor` running in the `europe-west1` region. To mitigate cold start latency during bursty traffic windows while establishing strict cost controls, a Cloud Engineer is instructed to reconfigure the service to maintain at least 3 warm container instances, cap the maximum scaling limit to 25 container instances, and allow each instance to process up to 100 simultaneous requests. The change must be applied to the existing running service configuration without re-deploying a new container image. Which `gcloud` command should the engineer execute?
An operations engineer needs to configure automated backup retention and disaster recovery for a production Cloud SQL for PostgreSQL instance, while also exporting database dumps periodically to a centralized Google Cloud Storage bucket located in a separate security project. Which TWO actions must the engineer perform to establish this operational workflow securely and effectively?
Select all that apply
An organization needs to grant a newly contracted developer read-only access to inspect Compute Engine virtual machines and view Cloud Storage objects within a specific Google Cloud project named `dev-sandbox-304`. The access must strictly adhere to the principle of least privilege without granting permissions across other projects. Which of the following actions should the cloud administrator take? (Select TWO.)
Select all that apply
Your organization maintains a production workload running on Compute Engine virtual machines in a custom Virtual Private Cloud (VPC) subnet with no external IP addresses assigned. The application requires outbound internet access to send telemetry data to an external API endpoint. In addition, system administrators require secure SSH access to these private instances without assigning public IP addresses or exposing the instances to the open internet. Which TWO network configuration actions should you perform to meet these requirements?
Select all that apply
An organization is configuring IAM access for an automated CI/CD pipeline service account. The service account must submit build tasks via Cloud Build and deploy updated code to Cloud Functions within the project `app-backend-prod`. The access must strictly adhere to the Principle of Least Privilege without extending rights to other projects or granting administrative control over unrelated services. Which TWO role bindings should be assigned to the service account? (Select TWO)
Select all that apply
A Cloud Engineer is using Google Cloud Deployment Manager to deploy infrastructure resources into a newly created target Google Cloud project named `prod-analytics-net`. During the execution of `gcloud deployment-manager deployments create`, the deployment fails because the required Compute Engine API has not been activated. How should the engineer resolve this failure?