0
0
GCPcloud~10 mins

IAM policy binding in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the role in the IAM policy binding.

GCP
{
  "role": "[1]",
  "members": ["user:alice@example.com"]
}
Drag options to blanks, or click blank then click option'
Aroles/storage.admin
Broles/editor
Croles/owner
Droles/viewer
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing roles/editor or roles/owner when only read access is needed.
Using a storage-specific role when the task is general.
2fill in blank
medium

Complete the code to specify a member type in the IAM policy binding.

GCP
{
  "role": "roles/viewer",
  "members": ["[1]:bob@example.com"]
}
Drag options to blanks, or click blank then click option'
Auser
BserviceAccount
Cgroup
Ddomain
Attempts:
3 left
💡 Hint
Common Mistakes
Using group or domain when specifying a single user.
Using serviceAccount when the member is a user.
3fill in blank
hard

Fix the error in the IAM policy binding by completing the member string correctly.

GCP
{
  "role": "roles/storage.objectViewer",
  "members": ["[1]:my-service-account@project.iam.gserviceaccount.com"]
}
Drag options to blanks, or click blank then click option'
Auser
BserviceAccount
Cgroup
Ddomain
Attempts:
3 left
💡 Hint
Common Mistakes
Using user or group prefix for service account emails.
Omitting the prefix entirely.
4fill in blank
hard

Fill both blanks to create an IAM policy binding with a group member and the correct role.

GCP
{
  "role": "[1]",
  "members": ["[2]:admins@example.com"]
}
Drag options to blanks, or click blank then click option'
Aroles/editor
Buser
Cgroup
Droles/viewer
Attempts:
3 left
💡 Hint
Common Mistakes
Using user instead of group for a group email.
Choosing roles/viewer instead of roles/editor for editing access.
5fill in blank
hard

Fill both blanks to create an IAM policy binding with a domain member and a storage admin role.

GCP
{
  "role": "[1]",
  "members": ["[2]:example.com"]
}
Drag options to blanks, or click blank then click option'
Aroles/viewer
Buser
Cdomain
Droles/storage.admin
Attempts:
3 left
💡 Hint
Common Mistakes
Using user or group instead of domain for domain-wide access.
Choosing roles/viewer instead of roles/storage.admin for admin access.