Associate Cloud Engineer practice question · Configuring access and security
A project contains dozens of Cloud Storage buckets. A data team needs roles/storage.objectViewer, but only on buckets…
A project contains dozens of Cloud Storage buckets. A data team needs roles/storage.objectViewer, but only on buckets whose names begin with "prod-" and on the objects in those buckets. New buckets that follow the naming convention should be covered automatically, without anyone having to update IAM. What should you configure?
- AA project-level role binding with an IAM Condition using resource.name.startsWith('projects/_/buckets/prod-')
- BA custom IAM role whose included permissions are scoped to buckets named with the "prod-" prefix
- CAn Organization Policy custom constraint requiring the "prod-" prefix on bucket names
- DA role binding on a folder that contains the project holding the "prod-" buckets
Show the answer and explanation
Correct answer: A) A project-level role binding with an IAM Condition using resource.name.startsWith('projects/_/buckets/prod-')
IAM Conditions can limit a role grant to resources whose full relative resource name matches a prefix, for example resource.name.startsWith('projects/_/buckets/prod-'). Custom roles, organization policies, and folder-level grants cannot filter access by name pattern.
Why each option is right or wrong
- A) Correct. IAM Conditions can test resource.name with startsWith(). For Cloud Storage, resource.name is the full relative resource name (projects/_/buckets/BUCKET/...), so the prefix has to include that path, not just "prod-". Because the condition checks the start of the name, it matches both the bucket and the objects in it, and any new bucket that follows the convention is covered automatically.
- B) Incorrect. A custom role is just a list of permissions. It cannot limit which resources those permissions apply to. Resource scoping comes from where you grant the role and from IAM Conditions.
- C) Incorrect. Organization Policy constraints control how resources can be configured. They do not grant or limit IAM access, so this would not give the team read access to the matching buckets.
- D) Incorrect. A folder-level binding is inherited by everything under the folder. That includes every bucket in the project, not only the buckets whose names start with "prod-".
- Exam domain
- Configuring access and security · ~20% of Associate Cloud Engineer
- Question type
- Multiple choice (one answer)
Related Associate Cloud Engineer questions
- VMs inside a VPC Service Controls perimeter use Private Google Access to reach Google APIs.Configuring access and security
- A team running GKE needs to let a developer group create and edit Deployments only in the payments namespace of one…Configuring access and security
- A GKE cluster has Google Groups for RBAC enabled, and the team's Google Group is nested in the gke-security-groups…Configuring access and security
- Applications in three VPC networks, each owned by a different team in a different project, must connect to one Cloud SQL…Configuring access and security
All 60 free Associate Cloud Engineer questions by domain · 15 sample questions on one page
Practise the full Associate Cloud Engineer exam
This question is one of a small free sample from the CertRidge Associate Cloud Engineer bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.
Original question written from the official exam guide. Not affiliated with Google Cloud; never copied from the real exam.