QuestionQ50

VerifiedImplementing observability practices and troubleshooting issues

You have deployed a fleet of Compute Engine instances in Google Cloud. You must ensure that the instances' monitoring metrics and logs are visible in Cloud Logging and Cloud Monitoring to your company's operations and cybersecurity teams. You need to grant the necessary roles to the Compute Engine service account by using Identity and Access Management (IAM), while adhering to the principle of least privilege. What should you do?

Explanation

The Logs Writer role (roles/logging.logWriter) grants permission to write log entries, while the Monitoring Metric Writer role (roles/monitoring.metricWriter) provides the write-only permissions needed to send metrics. Together, these roles allow the instances to publish the required telemetry without granting unnecessary administrative or configuration-editing permissions.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!