A Cloud Engineer is tasked with long-term retention of audit logs across all projects in an organization. The engineer creates an Organization-level Log Router sink configured to export Cloud Audit Logs to a centralized Cloud Storage bucket in a dedicated security project. Shortly after setup, the engineer notices that no log entries are arriving in the destination bucket. What is the most likely cause of this issue and how should it be resolved?
- The writer identity service account associated with the log sink has not been granted the necessary IAM role on the destination Cloud Storage bucket.Answer
- BThe Cloud Engineer must assign the primitive Owner role to their personal user account on the target security project to authorize log transfer.
- CThe Cloud Logging API must be manually enabled within the target Cloud Storage bucket configuration settings before log ingestion begins.
- DThe legacy Stackdriver Logging agent must be installed on the Cloud Storage destination endpoint to ingest exported logs.
Answer
The writer identity service account generated by the Log Router sink must be granted permission (such as the Storage Object Creator role) on the destination Cloud Storage bucket.
When creating a Log Router sink that exports logs to a destination (such as Cloud Storage, Pub/Sub, or BigQuery), Cloud Logging generates a writer identity service account. To complete the configuration, appropriate IAM write permissions (e.g., Storage Object Creator) must be explicitly granted to that service account on the destination resource.
Step-by-Step Solution
Key Concept
Cloud Logging Log Router cross-project destination authorization using writer identities