Google Professional Cloud DevOps Engineer Question 126
Single answerGoogle Cloud PlatformYour organization uses Google Cloud Logging to monitor applications and ensure compliance with regulatory standards. Due to legal requirements, you must retain certain application logs for 7 years, while minimizing costs. What should you do to meet these requirements?
- A
Export the required logs to a Cloud Storage bucket with a lifecycle policy configured for 7 years.
- B
Increase the default retention period of the logs in Cloud Logging to 7 years.
- C
Export the required logs to BigQuery and configure table partitioning for long-term storage.
- D
Store the required logs in Cloud Logging and enable the 'Archive' option for 7 years.
Show answer and explanation
Correct answer: A
Explanation
To comply with regulatory requirements for retaining logs for 7 years, you need to export the logs to an external storage solution that supports long-term retention. Cloud Storage is the most cost-effective and reliable option for this purpose. By configuring a lifecycle policy, you can also automate the deletion of logs after 7 years, further optimizing storage costs.
- A. Correct.
Correct. Exporting logs to a Cloud Storage bucket with a lifecycle policy ensures compliance with retention requirements while minimizing costs. Cloud Storage is a cost-effective solution for long-term log storage.
- B. Incorrect.
Incorrect. The default retention period in Cloud Logging cannot be extended to 7 years. The maximum retention period for Cloud Logging is 365 days (1 year).
- C. Incorrect.
Incorrect. While BigQuery can store logs for long periods, it is more expensive than Cloud Storage and is better suited for log analysis, not long-term archival.
- D. Incorrect.
Incorrect. Cloud Logging does not have a 'Archive' option, and its built-in retention periods are limited to 365 days. Long-term storage requires exporting logs to an external storage solution like Cloud Storage.