All practice questions
1591 questions
An operations team needs to adjust execution limits for a production Cloud Run service named `inventory-api` running in the `us-central1` region to prevent connection starvation on a backend database. The service must be constrained to handle a maximum of 80 concurrent requests per container instance and cap overall scaling at 20 concurrent container instances, while still allowing the service to scale down to zero when idle. Which `gcloud` command correctly configures these operational limits?
An organization needs to grant an external network security auditor read-only access to inspect Virtual Private Cloud (VPC) firewall rules and Compute Engine virtual machine instance configurations within a single Google Cloud project named `prod-network-sec`. The auditor must not be allowed to make structural changes, view sensitive data payloads, or automatically inherit access to other projects under the same organization node. Which of the following IAM role assignments satisfy these requirements while adhering to the principle of least privilege? (Select TWO choices.)
Select all that apply
An enterprise Cloud Operations team is managing Virtual Private Cloud (VPC) networking resources for a production environment hosted on Google Cloud Platform. The team needs to modify network configurations to accommodate expanding workloads and ensure predictable traffic evaluation. Which of the following statements regarding VPC subnet range expansion and firewall rule priority evaluation are correct? (Select TWO)
Select all that apply
A cloud administrator needs to promote an existing Cloud SQL read replica to an independent, standalone database instance to complete a planned regional workload separation. Arrange the operational steps in the correct chronological order to execute this promotion safely without data loss.
Drag items to arrange them in the correct order
A cloud operations engineer needs to safely isolate a malfunctioning node in a Google Kubernetes Engine (GKE) cluster for maintenance while ensuring high application availability. In which correct sequential order should the engineer execute these operational steps?
Drag items to arrange them in the correct order
A Cloud Engineer maintains an existing infrastructure repository managed with Terraform. The engineer modifies the configuration files to update the lifecycle rules of a Google Cloud Storage bucket named `google_storage_bucket.analytics_data` and add a new Compute Engine virtual machine instance. Before running a full deployment across the entire workspace, the engineer needs to deploy ONLY the storage bucket resource changes without creating the virtual machine or altering any other resources. Which Terraform CLI command should the engineer execute?
An organization is deploying an internal backend service packaged as a custom Docker container to Google Cloud Run. The service processes sensitive financial transactions and must only accept HTTP requests originating from resources within the same Virtual Private Cloud (VPC) network or VPC Service Controls perimeter. Additionally, unauthenticated public invocations must be prevented. Which `gcloud` command should the Cloud Engineer run to deploy this serverless application according to these security requirements?
An enterprise e-commerce platform relies on a Regional Managed Instance Group (RMIG) named `checkout-rmig` deployed in `us-east1` to handle production API traffic. The operations team created a updated Compute Engine instance template named `checkout-v2` containing critical software updates. To ensure zero downtime and maintain full serving capacity during the rollout, the deployment must guarantee that no active instances are terminated before replacement instances are provisioned and verified healthy. Which `gcloud` CLI command should you execute to accomplish this rolling update?
An infrastructure engineer needs to restrict outbound network traffic for Compute Engine instances located within a custom Virtual Private Cloud (VPC) subnet. The engineer creates a custom egress firewall rule that denies all egress traffic to destination with a priority of . A specific set of virtual machines tagged with `api-client` requires HTTPS access to an external partner service hosted at IP address . How should the engineer configure the firewall rules to allow this specific outbound connection while maintaining the blanket block?
A cloud engineer is deploying a new Cloud SQL for SQL Server instance for an enterprise application using the gcloud CLI. The application architecture specifies high availability with automatic failover across two zones in the us-central1 region, private network access within an existing Virtual Private Cloud named prod-vpc, and complete prevention of public IP allocation. Which gcloud command correctly provisions the database instance according to these requirements?
A Cloud Engineer is writing a deployment script to provision a backend database proxy virtual machine named `proxy-prod-01` on Compute Engine in zone `us-central1-a`.
The instance must meet the following strict requirements:
1. Prevent direct exposure to the public internet by omitting an external IP address.
2. Run using a user-managed service account named `[email protected]`.
3. Adhere to Google Cloud security best practices by delegating access control strictly to IAM roles assigned to the service account, rather than restricting access via legacy API access scopes.
4. Ensure the workload runs continuously without risk of sudden 30-second termination notices caused by host resource reclaim events.
Which `gcloud compute instances create` command correctly configures the instance according to these requirements?
--zone=us-central1-a \
--no-address \
--service-account=app-proxy-sa@my-gcp-project.iam.gserviceaccount.com \
--scopes=https://www.googleapis.com/auth/cloud-platform
--zone=us-central1-a \
--no-address \
--iam-account=app-proxy-sa@my-gcp-project.iam.gserviceaccount.com \
--scopes=https://www.googleapis.com/auth/cloud-platform
--zone=us-central1-a \
--no-address \
--service-account=app-proxy-sa@my-gcp-project.iam.gserviceaccount.com \
--scopes=https://www.googleapis.com/auth/cloud-platform \
--provisioning-model=SPOT
--zone=us-central1-a \
--no-address \
--service-account=app-proxy-sa@my-gcp-project.iam.gserviceaccount.com \
--scopes=editor
A cloud administrator needs to grant a development team access to view Pub/Sub topic details and inspect Cloud Monitoring metrics within a single Google Cloud project named `pubsub-prod-data`. The team must not have permission to publish messages, modify resources, or access other projects within the parent folder. To comply with the principle of least privilege, which TWO IAM role assignments should you configure? (Select TWO.)
Select all that apply
A security engineer is configuring access control for a log telemetry pipeline in a Google Cloud project named `telemetry-prod`. The architecture requires two distinct access configurations:
1. A developer group `[email protected]` must have full administrative control to manage Cloud Pub/Sub topics and subscriptions within `telemetry-prod`, but must not be granted permissions to modify other project resources or IAM policies.
2. An ingestion service account `[email protected]` must publish incoming log events to Cloud Pub/Sub topics within `telemetry-prod`, but must not be allowed to create, delete, or manage topic configurations.
Which TWO IAM policy bindings should you apply to fulfill these requirements while strictly adhering to the principle of least privilege?
Select all that apply
A newly hired database administrator needs read-only access to view Cloud SQL instance configuration details within a single project named `db-dev-app`. The administrator does not require access to read database table contents or modify any resources. Adhering to the principle of least privilege, which IAM role assignment should you select?
An operations team needs to collect system metrics (such as memory utilization) and application log files from a fleet of Compute Engine Virtual Machine (VM) instances. Which of the following actions should the team perform following Google Cloud recommended practices? (Select TWO.)
Select all that apply
An infrastructure team is configuring ingress firewall rules in a custom-mode Virtual Private Cloud (VPC) network. The web application frontend Compute Engine instances carry the network tag `web-frontend`. The team needs to allow public inbound HTTPS (TCP port 443) traffic to these instances from any IPv4 source (`0.0.0.0/0`), but must strictly block all inbound HTTPS traffic coming from a known malicious subnet (`198.51.100.0/24`), even if those requests target the `web-frontend` instances. Which firewall rule configuration correctly achieves this requirement while adhering to Google Cloud VPC rule evaluation precedence?
A Cloud Engineer needs to update an existing Google Cloud Deployment Manager deployment named `prod-network` using a revised template configuration file `vpc-config.yaml`. The engineer must first preview the resource modifications without finalizing the deployment, and then apply the previewed changes to update the live environment. Which TWO `gcloud` CLI commands should the engineer execute to complete this workflow?
Select all that apply
You need to update an existing regional Managed Instance Group named `frontend-mig` to use a new instance template named `frontend-v2` without incurring application downtime. Which sequence represents the correct chronological order of `gcloud` operations to execute this update and verify system stability?
Drag items to arrange them in the correct order
A data analyst needs to execute query jobs in a Google Cloud project and read table data within a specific BigQuery dataset. Following the principle of least privilege, which TWO IAM roles should be granted to the analyst?
Select all that apply
A cloud engineer needs to deploy a high-availability Compute Engine instance named `web-prod-01` in zone `us-central1-a` using the `gcloud` CLI. The application hosted on this instance cannot tolerate unexpected downtime during host infrastructure updates, so the virtual machine must be migrated to another host during maintenance events rather than shut down. Additionally, if the host hardware experiences a failure, the instance must automatically restart. Which `gcloud compute instances create` command should the engineer execute to meet these requirements?