Google Cloud Professional Cloud Security Engineer — Question 249

You will create a new Service Account that should be able to list the Compute Engine instances in the project. You want to follow Google-recommended practices.
What should you do?

Answer options

Correct answer: B

Explanation

The correct answer is B because creating a custom role with the specific permission compute.instances.list allows for precise access control, adhering to the principle of least privilege. Option A is incorrect as Instance Templates are not necessary for listing instances. Options C and D grant broader roles that exceed the requirement, which is not in line with Google-recommended practices.