Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 398 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 398

Select 4Google Cloud Platform

You are developing a serverless application on Google Cloud that uses Cloud Run to handle HTTP requests. Your application needs to connect to a Cloud SQL database securely. Which steps should you take to manage the connection effectively?

  1. A

    Enable the Cloud SQL Admin API and configure the Cloud SQL instance with a private IP.

  2. B

    Use the Cloud SQL Auth proxy to handle authentication and connection pooling.

  3. C

    Assign the Cloud Run service a service account with Cloud SQL Client role permissions.

  4. D

    Store the Cloud SQL database credentials in a configuration file and upload it to Cloud Storage for secure access.

  5. E

    Configure the Cloud Run service to connect to the Cloud SQL instance using the instance connection name.

Show answer and explanation

Correct answers: A, B, C, E

Explanation

To securely and effectively connect a Cloud Run service to a Cloud SQL database, you need to follow best practices such as enabling required APIs, using the Cloud SQL Auth proxy for authentication and connection pooling, assigning appropriate IAM roles to the service account, and configuring the instance connection name. Avoid storing credentials in plain text or insecure locations like configuration files.

  • A. Correct.

    Correct. Enabling the Cloud SQL Admin API and configuring the instance with a private IP ensures secure and manageable connections.

  • B. Correct.

    Correct. The Cloud SQL Auth proxy handles authentication and connection pooling efficiently, reducing connection overhead.

  • C. Correct.

    Correct. Assigning the Cloud Run service a service account with the Cloud SQL Client role ensures it has the necessary permissions to access the database.

  • D. Incorrect.

    Incorrect. Storing credentials in a configuration file and uploading it to Cloud Storage is insecure and does not follow best practices for secret management.

  • E. Correct.

    Correct. The instance connection name is required for the Cloud Run service to connect to the Cloud SQL instance.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam