Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
An organization is building an event-driven microservices application on Google Cloud. You deploy a containerized order-processing service to Cloud Run and configure it to require authentication so that it cannot be accessed publicly. You want to configure an Eventarc trigger to route new order messages published to a Cloud Pub/Sub topic directly to this Cloud Run service.
You create a dedicated user-managed service account to associate with the Eventarc trigger.
Which Identity and Access Management (IAM) role must you grant to this service account so Eventarc can successfully deliver events to your Cloud Run service?
The Cloud Run Admin (roles/run.admin) role provides full administrative control over all Cloud Run resources within a project or service boundary. This includes the ability to deploy new container revisions, delete services, update environment variables, and modify IAM policies.
Although roles/run.admin technically includes the run.routes.invoke permission necessary to call a Cloud Run service, granting it to a trigger service account violates core Google Cloud security best practices:
The service account belonged to a CI/CD build pipeline or continuous deployment agent responsible for deploying container images and configuring revisions.
The Eventarc Admin (roles/eventarc.admin) role is an administrative role granting full control over Eventarc resources across a project. It allows administrators to create, update, list, and delete Eventarc triggers, channels, and enrollments.
There is a critical distinction between managing infrastructure and authenticating runtime invocations:
roles/eventarc.admin is used by engineers or provisioning tools to configure triggers.run.services.*). Because roles/eventarc.admin contains only Eventarc permissions, Cloud Run will deny access when the trigger attempts to deliver an event.You needed to grant an infrastructure engineer or service account the permissions required to create and delete Eventarc triggers in Google Cloud.
The Cloud Run Invoker (roles/run.invoker) role is a predefined Identity and Access Management (IAM) role in Google Cloud. It provides the specific permission (run.routes.invoke) required to send HTTP requests to an authenticated Cloud Run service.
When a Cloud Run service is deployed with ingress settings configured to require authentication, all unauthenticated incoming requests receive an HTTP 401 Unauthorized or HTTP 403 Forbidden response. When an Eventarc trigger routes an event from an event provider (such as a Cloud Pub/Sub topic) to a private Cloud Run destination:
roles/run.invoker) role on that target service.Granting roles/run.invoker allows the Eventarc delivery pipeline to authenticate itself to the secured Cloud Run service while preventing unauthorized public requests. It provides the exact runtime capability needed for event routing without granting unnecessary permissions.

The Pub/Sub Publisher (roles/pubsub.publisher) role allows an identity to send and publish messages to a Google Cloud Pub/Sub topic. It provides the pubsub.topics.publish permission at the project or topic level.
In an event-driven architecture with Eventarc:
roles/pubsub.publisher does not grant run.routes.invoke, meaning Cloud Run will reject incoming requests sent by Eventarc with an authentication error.This role would be required if the service account belonged to an event producer application that needed to publish order messages directly to the Pub/Sub topic.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated