An operations team creates a Cloud Logging Log Router sink in a source Google Cloud project to export audit logs to a Pub/Sub topic located in a separate compliance project. After configuring the sink, they observe that log messages are not arriving in the destination Pub/Sub topic. What configuration step is required to enable log delivery?
- Grant the Pub/Sub Publisher role to the unique writer identity service account generated by the Log Router sink on the destination Pub/Sub topic.Cevap
- BGrant the primitive Owner role on the compliance project to the source project's default Compute Engine service account.
- CEnable the Cloud Logging API in the compliance destination project to allow incoming log streams.
- DInstall the legacy Stackdriver Logging agent on the Pub/Sub service instances to accept cross-project telemetry.
Cevap
Grant the Pub/Sub Publisher role to the unique writer identity service account generated by the Log Router sink on the destination Pub/Sub topic.
When creating a Cloud Logging Log Router sink to export logs across projects (such as to a Pub/Sub topic, Cloud Storage bucket, or BigQuery dataset), Google Cloud assigns a unique service account known as the sink's writer identity. To allow successful log delivery, this writer identity service account must be granted appropriate predefined IAM permissions—specifically the Pub/Sub Publisher role—directly on the destination Pub/Sub topic.
Adım Adım Çözüm
Anahtar Kavram
Log Router Sink Writer Identity and Cross-Project IAM Authorization