A Linux VM must use a specific service account (not the Compute Engine default) to connect to Cloud SQL. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: When creating the VM in the Cloud Console, specify the service account under Identity and API access..
Why this is the answer
When creating a VM instance, you can assign a specific service account under "Identity and API access" in the Cloud Console. This securely configures the VM to use the specified service account for API calls, including connecting to Cloud SQL, without needing to manage credentials manually on the VM. Downloading service account JSON keys and storing them in metadata or directly on the VM is generally discouraged for security reasons. Metadata is not designed for sensitive credentials, and storing keys directly on the VM increases the risk of compromise. The compute-engine-service-account metadata key is not a standard or recommended method for configuring service accounts for VMs.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed