ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 130 - Professional Cloud DevOps Engineer discussion

Report
Export

You are configuring Cloud Logging for a new application that runs on a Compute Engine instance with a public IP address. A user-managed service account is attached to the instance. You confirmed that the necessary agents are running on the instance but you cannot see any log entries from the instance in Cloud Logging. You want to resolve the issue by following Google-recommended practices. What should you do?

A.
Add the Logs Writer role to the service account.
Answers
A.
Add the Logs Writer role to the service account.
B.
Enable Private Google Access on the subnet that the instance is in.
Answers
B.
Enable Private Google Access on the subnet that the instance is in.
C.
Update the instance to use the default Compute Engine service account.
Answers
C.
Update the instance to use the default Compute Engine service account.
D.
Export the service account key and configure the agents to use the key.
Answers
D.
Export the service account key and configure the agents to use the key.
Suggested answer: A

Explanation:

The correct answer is

A) Add the Logs Writer role to the service account.

To use Cloud Logging, the service account attached to the Compute Engine instance must have the necessary permissions to write log entries. The Logs Writer role (roles/logging.logWriter) provides this permission. You can grant this role to the user-managed service account at the project, folder, or organization level1.

Private Google Access is not required for Cloud Logging, as it allows instances without external IP addresses to access Google APIs and services2. The default Compute Engine service account already has the Logs Writer role, but it is not a recommended practice to use it for user applications3. Exporting the service account key and configuring the agents to use the key is not a secure way of authenticating the service account, as it exposes the key to potential compromise4.

1: Access control with IAM | Cloud Logging | Google Cloud

2: Private Google Access overview | VPC | Google Cloud

3: Service accounts | Compute Engine Documentation | Google Cloud

4: Best practices for securing service accounts | IAM Documentation | Google Cloud

asked 18/09/2024
Juan Araya
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first