▸case-01 We are configuring a Google Cloud Pub/Sub topic in Terraform for financial payload processing. Developers suggest relying on default Google-managed encryption keys, but company compliance mandates using a dedicated Cloud KMS key ring location 'us-central1' key 'crypto-key-1'. Write the Terraform configuration for this Pub/Sub topic. | pass→pass | 16,401 | 19,671 | +20% | 1 | 1 | 0% | 2,278 | 3,542 | +55% | 0 | 0 | — |
▸case-02 Our team needs to enforce JSON data structure on messages published to a GCP Pub/Sub topic using an Avro schema 'projects/my-project/schemas/order-schema'. A team member suggested parsing validation inside subscriber application code instead of schema binding on the topic. Provide the Terraform block to create the topic with strict JSON schema encoding enforcement. | pass→pass | 11,764 | 13,787 | +17% | 1 | 1 | 0% | 1,133 | 2,051 | +81% | 0 | 0 | — |
▸case-03 To comply with data sovereignty laws, published messages on a GCP Pub/Sub topic must only be persisted in European data centers ('europe-west1' and 'europe-west3'). Standard default configuration persists messages globally across all GCP regions. Show the Terraform setup for the topic enforcing this regional restriction. | pass→pass | 11,095 | 13,093 | +18% | 1 | 1 | 0% | 1,059 | 1,877 | +77% | 0 | 0 | — |
▸case-04 An SRE team wants to retain unacknowledged messages directly on a GCP Pub/Sub topic for 3 days so that new subscriptions created later can seek back in time. The default topic behavior is 0 days (messages deleted as soon as acknowledged by all subscriptions). Write the gcloud pubsub topics create command line invocation specifying this retention period. | pass→pass | 8,670 | 8,929 | +3% | 1 | 1 | 0% | 659 | 1,101 | +67% | 0 | 0 | — |
▸case-05 A microservice running in project 'service-prod-123' needs permissions to publish messages to a Pub/Sub topic 'order-events' located in project 'core-pubsub-456'. A developer suggests giving the service account project-wide roles/owner on the topic's project. Provide the Terraform code for granting minimum required Pub/Sub publishing IAM permissions on the specific topic. | pass→pass | 14,210 | 15,317 | +8% | 1 | 1 | 0% | 1,765 | 2,446 | +39% | 0 | 0 | — |
▸case-16 For an operational dashboard service account 'dash-sa@my-project.iam.gserviceaccount.com', we need to allow it to list and view metadata on topic 'metrics-topic' without giving message publishing or subscription creation permissions. Write the gcloud pubsub topic command to add this IAM binding. | pass→pass | 10,955 | 9,801 | -11% | 1 | 1 | 0% | 1,138 | 1,287 | +13% | 0 | 0 | — |
▸case-06 When setting up dead-lettering for a Pub/Sub topic workflow, messages sent to the dead-letter topic fail with delivery errors unless permissions are explicitly assigned. Someone suggested giving the default Compute Engine service account publisher rights. Specify the exact GCP service account pattern and IAM role required on the dead-letter topic for Pub/Sub system delivery. | pass→pass | 12,035 | 12,184 | +1% | 1 | 1 | 0% | 1,273 | 1,820 | +43% | 0 | 0 | — |
▸case-07 We want to configure a GCP Pub/Sub topic that ingests streaming data directly from an AWS Kinesis data stream 'arn:aws:kinesis:us-east-1:123456789012:stream/telemetry' without intermediate Cloud Functions. Developers suggest writing a custom polling script. Provide the Terraform google_pubsub_topic configuration with native Kinesis ingestion enabled. | pass→pass | 14,071 | 18,076 | +28% | 1 | 1 | 0% | 1,952 | 3,114 | +60% | 0 | 0 | — |
▸case-08 Our data team wants a GCP Pub/Sub topic to automatically ingest files uploaded to a Cloud Storage bucket 'gs://landing-bucket-data/' matching text format. Engineers proposed using bucket notifications triggered via Cloud Functions. Show the Terraform topic definition using native Cloud Storage ingestion. | pass→pass | 15,658 | 18,031 | +15% | 1 | 1 | 0% | 2,155 | 2,829 | +31% | 0 | 0 | — |
▸case-09 To isolate corrupt messages from breaking subscribers, we need a primary Pub/Sub topic and a dead-letter Pub/Sub topic, alongside a subscription configured to route failed messages to the dead-letter topic after 5 failed delivery attempts. Draft the gcloud commands to create both topics and configure the subscription's dead-letter policy. | pass→pass | 14,333 | 16,317 | +14% | 1 | 1 | 0% | 1,971 | 2,690 | +36% | 0 | 0 | — |
▸case-10 Write a Python script using the google-cloud-pubsub client library to create a topic named 'analytics-events' with metadata labels 'environment: production' and 'team: data'. A colleague suggested using HTTP REST API requests directly with requests library instead of the official client. Provide the Python code using official Pub/Sub library. | pass→pass | 14,946 | 17,142 | +15% | 1 | 1 | 0% | 2,058 | 2,736 | +33% | 0 | 0 | — |
▸case-11 Security compliance requires audit logging for all publish attempts on a critical Pub/Sub topic 'payment-transactions'. An engineer proposes setting up Cloud Logging log sinks with custom regex filtering on application stdout. What GCP IAM Audit Config policy block in Terraform enables Pub/Sub service Data Write audit logging for topic operations? | pass→pass | 11,466 | 12,623 | +10% | 1 | 1 | 0% | 1,181 | 1,731 | +47% | 0 | 0 | — |
▸case-12 We are integrating Azure streaming data into GCP Pub/Sub topic 'azure-telemetry'. Developers proposed hosting an Event Hub consumer app in GKE. Provide the Terraform google_pubsub_topic configuration using GCP's native Azure Event Hubs ingestion settings. | pass→pass | 15,530 | 18,106 | +17% | 1 | 1 | 0% | 2,109 | 2,961 | +40% | 0 | 0 | — |
▸case-13 We are establishing a Pub/Sub topic for high-throughput microservice communication using Protocol Buffers schema 'projects/my-project/schemas/user-event-proto'. Developers are unsure whether to set encoding to binary or text. Show the Terraform snippet to create the topic using binary schema encoding. | pass→pass | 3,739 | 10,828 | +190% | 1 | 1 | 0% | 732 | 1,441 | +97% | 0 | 0 | — |
▸case-14 When setting up a Pub/Sub topic with CMEK key 'projects/p1/locations/global/keyRings/kr1/cryptoKeys/k1', the operations team needs to ensure that the topic encrypts data using this Cloud KMS key. Write the gcloud command to create the topic with the specified KMS key flag. | pass→pass | 3,899 | 10,187 | +161% | 1 | 1 | 0% | 736 | 1,332 | +81% | 0 | 0 | — |
▸case-15 We want to use the official Google Terraform module 'terraform-google-modules/pubsub/google' to create a Pub/Sub topic 'orders-topic' with retention settings. Provide the Terraform module block invocation. | pass→pass | 11,310 | 11,806 | +4% | 1 | 1 | 0% | 1,218 | 1,643 | +35% | 0 | 0 | — |
▸case-17 Configure a GCP Pub/Sub topic to ingest text-formatted log files from Cloud Storage bucket 'app-logs-bucket' with file match pattern '*.log'. Provide the Terraform configuration snippet for this topic creation. | fail→fail | 18,781 | 18,185 | -3% | 1 | 1 | 0% | 2,558 | 2,869 | +12% | 0 | 0 | — |
▸case-18 A developer is configuring a Pub/Sub topic and wants to set `--message-retention-duration=60d` in gcloud. However, GCP Pub/Sub topic retention duration has maximum allowed constraints. What is the maximum allowed duration for Pub/Sub topic message retention, and what gcloud command creates a topic with this maximum allowed duration? | fail→pass | 12,019 | 13,708 | +14% | 1 | 1 | 0% | 1,291 | 1,887 | +46% | 0 | 0 | — |
▸case-19 A company requirement mandates that messages published to topic 'sensitive-data-topic' must NEVER be stored in 'us-central1' due to local compliance testing. Provide the Terraform configuration defining allowed persistence regions restricted to 'us-east1' and 'us-west1'. | pass→pass | 9,290 | 11,424 | +23% | 1 | 1 | 0% | 753 | 1,565 | +108% | 0 | 0 | — |
▸case-20 We need to set up a rate-limited queue service for asynchronous background processing in GCP using Cloud Tasks. Developers want to configure maximum 100 dispatch rate per second and maximum 10 concurrent tasks on queue 'email-queue'. Provide the Terraform google_cloud_tasks_queue block. | pass→pass | 9,506 | 9,598 | +1% | 1 | 1 | 0% | 840 | 1,324 | +58% | 0 | 0 | — |
▸case-21 We have an existing Pub/Sub topic 'user-signups'. Now we need to set up a Push Subscriber on endpoint 'https://example.com/push-handler' with an acknowledgement deadline of 60 seconds and exponential backoff retry policy. Provide the Terraform configuration for this subscription. | pass→pass | 11,892 | 13,694 | +15% | 1 | 1 | 0% | 1,401 | 2,059 | +47% | 0 | 0 | — |
▸case-22 We need to create a BigQuery dataset table 'billing_events' partitioned by day with partition expiration in GCP. Provide the Terraform resource block google_bigquery_table for this table setup. | pass→pass | 13,928 | 14,150 | +2% | 1 | 1 | 0% | 1,788 | 2,238 | +25% | 0 | 0 | — |