Bird
0
0

To automate Cloud SQL Proxy startup on a Compute Engine VM using a service account key file named key.json, which command correctly authenticates with the key?

hard📝 Application Q9 of 15
GCP - Cloud SQL and Databases
To automate Cloud SQL Proxy startup on a Compute Engine VM using a service account key file named key.json, which command correctly authenticates with the key?
Acloud_sql_proxy -instances=my-project:us-central1:my-instance=tcp:3306 -credential_file=key.json
Bcloud_sql_proxy -instances=my-project:us-central1:my-instance=tcp:3306 -key=key.json
Ccloud_sql_proxy -instances=my-project:us-central1:my-instance=tcp:3306 --service_account=key.json
Dcloud_sql_proxy -instances=my-project:us-central1:my-instance=tcp:3306 -auth=key.json
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct flag

    The Cloud SQL Proxy uses '-credential_file' to specify the service account key file.
  2. Step 2: Verify options

    cloud_sql_proxy -instances=my-project:us-central1:my-instance=tcp:3306 -credential_file=key.json uses the correct flag and syntax.
  3. Final Answer:

    cloud_sql_proxy -instances=my-project:us-central1:my-instance=tcp:3306 -credential_file=key.json -> Option A
  4. Quick Check:

    Use '-credential_file' for service account keys [OK]
Quick Trick: Use -credential_file=key.json for authentication [OK]
Common Mistakes:
  • Using incorrect flags like -key or -auth
  • Assuming --service_account is valid
  • Omitting the credential file flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes