Google Cloud Professional Cloud Developer — Question 304

You are about to deploy an application hosted on a Compute Engine instance with Windows OS and Cloud SQL. You plan to use the Cloud SQL Auth Proxy for connectivity to the Cloud SQL instance. You plan to follow Google-recommended practices and the principle of least privilege. You have already created a custom service account. What should you do next?

Answer options

Correct answer: A

Explanation

The correct answer is A because creating a custom role with the cloudsql.instances.connect permission ensures that the service account has the minimum necessary privilege to connect to the Cloud SQL instance. Option B grants a broader role than needed, while C and D provide insufficient permissions to establish a connection to Cloud SQL, which violates the principle of least privilege.