You created a Stackdriver chart for CPU utilization in a dashboard within your workspace project. You want to share the chart with your Site Reliability Engineering
(SRE) team only. You want to ensure you follow the principle of least privilege. What should you do?
A. Share the workspace Project ID with the SRE team. Assign the SRE team the Monitoring Viewer IAM role in the workspace project.
B. Share the workspace Project ID with the SRE team. Assign the SRE team the Dashboard Viewer IAM role in the workspace project.
C. Click Share chart by URL and provide the URL to the SRE team. Assign the SRE team the Monitoring Viewer IAM role in the workspace project.
D. Click Share chart by URL and provide the URL to the SRE team. Assign the SRE team the Dashboard Viewer IAM role in the workspace project.
Disclaimer
This is a practice question. There is no guarantee of coming this question in the certification exam.
Answer
C
Explanation
The valid roles are: Monitoring Viewer and Monitoring Dashboard Configuration Viewer. You can only share the chart by URL using Metrics explorer.
With only Monitoring Dashboard Configuration Viewer role, user cannot see anything in Monitoring page.
https://cloud.google.com/iam/docs/understanding-roles#monitoring.viewer
Cloud Monitoring allows you to share the URL of the individual Dashboard and not of the entire project ID.
A. Share the workspace Project ID with the SRE team. Assign the SRE team the Monitoring Viewer IAM role in the workspace project.
B. Share the workspace Project ID with the SRE team. Assign the SRE team the Dashboard Viewer IAM role in the workspace project.
C. Click Share chart by URL and provide the URL to the SRE team. Assign the SRE team the Monitoring Viewer IAM role in the workspace project.
D. Click Share chart by URL and provide the URL to the SRE team. Assign the SRE team the Dashboard Viewer IAM role in the workspace project.