Google Cloud Professional Cloud Developer — Question 2

You are planning to migrate a MySQL database to the managed Cloud SQL database for Google Cloud. You have Compute Engine virtual machine instances that will connect with this Cloud SQL instance. You do not want to whitelist IPs for the Compute Engine instances to be able to access Cloud SQL.
What should you do?

Answer options

Correct answer: A

Explanation

The correct answer is A because enabling private IP allows the Compute Engine instances to connect to the Cloud SQL instance over a private network without needing to whitelist IPs. Options B, C, and D involve methods that require additional configurations or external access, which do not meet the requirement of avoiding IP whitelisting.