Bird
0
0

To restrict a user to only start and stop Compute Engine instances without permissions to create or delete them, which IAM strategy aligns best with advanced IAM principles?

hard📝 Best Practice Q8 of 15
GCP - Cloud IAM Advanced
To restrict a user to only start and stop Compute Engine instances without permissions to create or delete them, which IAM strategy aligns best with advanced IAM principles?
AAssign the predefined roles/editor role to the user
BCreate a custom role with only start and stop instance permissions and assign it to the user
CGrant the user the roles/compute.admin role and rely on monitoring
DUse the roles/viewer role and instruct the user to avoid creating or deleting instances
Step-by-Step Solution
Solution:
  1. Step 1: Identify required permissions

    The user needs permissions only to start and stop instances, not create or delete.
  2. Step 2: Evaluate IAM roles

    Predefined roles like roles/editor or roles/compute.admin grant broader permissions than needed.
  3. Step 3: Choose custom role

    Creating a custom role with only the necessary permissions follows the principle of least privilege.
  4. Final Answer:

    Create a custom role with only start and stop instance permissions and assign it to the user -> Option B
  5. Quick Check:

    Custom roles enable precise permission assignment [OK]
Quick Trick: Use custom roles for least privilege access [OK]
Common Mistakes:
  • Assigning overly broad predefined roles
  • Relying on user discipline instead of permissions
  • Granting admin roles unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes