Google Professional Cloud Security Engineer Question 457
Single answerGoogle Cloud PlatformYour organization requires that all Cloud Logging entries across multiple projects be exported to a centralized Cloud Storage bucket in a separate project for long-term retention. You need to configure the logging export to meet this requirement while ensuring minimal administrative overhead. Which configuration should you implement?
- A
Create a log sink in each project and set the destination to the centralized Cloud Storage bucket.
- B
Create an aggregated sink in the centralized project and configure it to capture logs from all relevant projects.
- C
Create a log sink in each project and configure the destination to a Pub/Sub topic, which then forwards logs to the centralized Cloud Storage bucket.
- D
Create an aggregated sink in the centralized project and configure it to filter and capture only ERROR logs from all relevant projects.
Show answer and explanation
Correct answer: B
Explanation
Aggregated sinks are designed to centralize log exports from multiple projects into a single destination, such as a Cloud Storage bucket. By creating an aggregated sink in the centralized project, you can efficiently capture logs from all relevant projects and export them to the desired destination without the need to manage separate log sinks for each project. This minimizes administrative overhead and ensures scalability.
- A. Incorrect.
This option would work but requires creating a log sink in every project, resulting in significant administrative overhead and reduced scalability.
- B. Correct.
This is the correct approach. Aggregated sinks allow you to centralize logging by capturing logs from multiple projects into a centralized destination like a Cloud Storage bucket, minimizing administrative overhead.
- C. Incorrect.
Using a Pub/Sub topic adds unnecessary complexity to the solution when an aggregated sink can directly export logs to Cloud Storage.
- D. Incorrect.
Although an aggregated sink is the correct approach, this configuration only captures ERROR logs, which does not meet the requirement to export all logs.