GCP - Cloud IAM AdvancedWhich of the following is the correct way to assign a role to a user in GCP IAM policy JSON?A"members": "roles/viewer", "role": ["user:alice@example.com"]B"role": "user:alice@example.com", "members": ["roles/viewer"]C"user": "roles/viewer", "member": "alice@example.com"D"members": ["user:alice@example.com"], "role": "roles/viewer"Check Answer
Step-by-Step SolutionSolution:Step 1: Recall correct IAM JSON structureIAM bindings use "role" for the role name and "members" as a list of identities.Step 2: Match correct syntax"members": ["user:alice@example.com"], "role": "roles/viewer" correctly places the user in "members" and the role in "role" with proper formatting.Final Answer:"members": ["user:alice@example.com"], "role": "roles/viewer" -> Option DQuick Check:Role = roles/viewer, Members = user list [OK]Quick Trick: Remember: role is a string, members is a list [OK]Common Mistakes:Swapping role and members fieldsUsing string instead of list for membersIncorrect key names like 'user' or 'member'
Master "Cloud IAM Advanced" in GCP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More GCP Quizzes Cloud Firestore and Bigtable - Firestore document model - Quiz 5medium Cloud Functions - Function runtime environments - Quiz 13medium Cloud IAM Advanced - IAM deny policies - Quiz 9hard Cloud Load Balancing - Health checks configuration - Quiz 3easy Cloud Monitoring and Logging - Log-based metrics - Quiz 2easy Cloud Monitoring and Logging - Cloud Trace for latency analysis - Quiz 4medium Cloud Monitoring and Logging - Alerting policies - Quiz 5medium Cloud Pub/Sub - Message retention and acknowledgment - Quiz 4medium Cloud Pub/Sub - Why messaging matters - Quiz 7medium Cloud Run - Cloud Run service concept - Quiz 5medium