PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #4
You manage an application that is writing logs to Stackdriver Logging. You need to give some team members the ability to export logs. What should you do?
The correct answer is A. Grant the team members the IAM role of logging.configWriter on Cloud IAM. To grant team members the ability to export logs from Cloud Logging, assign them the logging.configWriter IAM role.
Question
Options
- AGrant the team members the IAM role of logging.configWriter on Cloud IAM.
- BConfigure Access Context Manager to allow only these members to export logs.
- CCreate and grant a custom IAM role with the permissions logging.sinks.list and logging.sink.get.
- DCreate an Organizational Policy in Cloud IAM to allow only these members to create log exports.
How the community answered
(56 responses)- A91% (51)
- B5% (3)
- C2% (1)
- D2% (1)
Why each option
To grant team members the ability to export logs from Cloud Logging, assign them the `logging.configWriter` IAM role.
The `logging.configWriter` IAM role (or Logs Configuration Writer role) provides permissions to manage log sinks, which are the mechanisms used in Cloud Logging to export logs to other destinations like Cloud Storage, BigQuery, or Pub/Sub. Granting this role allows team members to create and configure these export sinks.
Access Context Manager controls access *based on context* (e.g., IP address, device compliance), not for granting specific resource management permissions like creating log sinks.
`logging.sinks.list` and `logging.sink.get` only allow listing and viewing log sinks; they do not grant permission to *create* or *manage* log sinks, which is necessary for exporting logs.
Organizational Policies define constraints across an organization (e.g., restricting resource locations) and are not used to grant specific IAM permissions to individual users or groups for resource management.
Concept tested: GCP IAM for Cloud Logging, log export permissions
Source: https://cloud.google.com/logging/docs/access-control
Topics
Community Discussion
No community discussion yet for this question.