Question

Difficulty: MediumMonitoring and Logging

An operations engineer is responsible for maintaining system availability in a Google Cloud project named `prod-services`. The engineer currently holds the Monitoring Viewer (`roles/monitoring.viewer`) IAM role but receives a permission error when attempting to configure new alerting policies and notification channels in Cloud Monitoring. Following Google-recommended practices and the principle of least privilege, which action should be taken to resolve this issue?

  1. Grant the engineer the Monitoring Editor (`roles/monitoring.editor`) role on the `prod-services` project.Answer
  2. B
    Grant the engineer the Editor (`roles/editor`) primitive role on the `prod-services` project.
  3. C
    Grant the Monitoring Viewer role at the Organization level to override project-level policy restriction rules.
  4. D
    Enable the Cloud Monitoring API in the organization's central billing project instead of the `prod-services` project.

Answer

Grant the engineer the Monitoring Editor (`roles/monitoring.editor`) role on the `prod-services` project.
The Monitoring Editor (`roles/monitoring.editor`) predefined role includes all necessary permissions to create, update, and delete Cloud Monitoring alerting policies, uptime checks, and notification channels. It aligns with the principle of least privilege by scope-limiting access strictly to observability resources within the target project.

Step-by-Step Solution

1
Identify the missing IAM capability
The engineer currently holds `roles/monitoring.viewer`, which permits viewing monitoring data but restricts creating or updating alerting policies and notification channels.
Creating alerting policies requires `monitoring.alertPolicies.create` and related write permissions.
2
Evaluate role options against the principle of least privilege
Select `roles/monitoring.editor` which provides full control over Cloud Monitoring resources without granting unnecessary access to unrelated service resources.
Predefined roles tailor permissions strictly to the required operational scope.

Key Concept

Cloud Monitoring IAM Roles and Least Privilege Access Control
Rate this question