Bird
0
0

You attempted to create a custom role with this command:

medium📝 Debug Q7 of 15
GCP - Cloud IAM Advanced
You attempted to create a custom role with this command:
gcloud iam roles create auditRole --project=my-project --title="Audit Role" --permissions=storage.buckets.get,storage.buckets.update

The command fails with an error indicating insufficient permissions. What is the most likely cause?
AYour user account lacks the 'iam.roles.create' permission in the project.
BThe permissions 'storage.buckets.get' and 'storage.buckets.update' are invalid permissions.
CThe role title contains invalid characters and causes the failure.
DCustom roles cannot include permissions related to storage buckets.
Step-by-Step Solution
Solution:
  1. Step 1: Check user permissions

    Creating custom roles requires the 'iam.roles.create' permission on the project or organization.
  2. Step 2: Verify permissions validity

    The permissions 'storage.buckets.get' and 'storage.buckets.update' are valid storage permissions.
  3. Step 3: Confirm role title format

    The role title "Audit Role" is valid and does not cause errors.
  4. Final Answer:

    Your user account lacks the 'iam.roles.create' permission in the project. -> Option A
  5. Quick Check:

    Verify your IAM permissions for role creation [OK]
Quick Trick: Check if you have 'iam.roles.create' permission [OK]
Common Mistakes:
  • Assuming permission names are invalid without verification
  • Ignoring the need for 'iam.roles.create' permission
  • Blaming role title formatting for permission errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes