exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 241 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 241
Topic #: 1
[All Professional Cloud Developer Questions]

You have deployed a Java application to Cloud Run. Your application requires access to a database hosted on Cloud SQL. Due to regulatory requirements, your connection to the Cloud SQL instance must use its internal IP address. How should you configure the connectivity while following Google-recommended best practices?

  • A. Configure your Cloud Run service with a Cloud SQL connection.
  • B. Configure your Cloud Run service to use a Serverless VPC Access connector.
  • C. Configure your application to use the Cloud SQL Java connector.
  • D. Configure your application to connect to an instance of the Cloud SQL Auth proxy.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
alpha_canary
6 months, 3 weeks ago
Selected Answer: B
https://cloud.google.com/sql/docs/mysql/connect-run#private-ip
upvoted 1 times
...
__rajan__
1 year, 1 month ago
Selected Answer: B
B is correct.
upvoted 1 times
...
Maddyricky
1 year, 8 months ago
Selected Answer: B
It should be B, EI faced this exact challenge in one of my projects
upvoted 3 times
...
mrvergara
1 year, 8 months ago
Selected Answer: B
Option B, using a Serverless VPC Access connector, is the recommended best practice for accessing a Cloud SQL instance from Cloud Run because it provides a secure and scalable way to connect to your internal resources. With this option, you can connect your Cloud Run service to your internal VPC network, allowing it to access resources such as Cloud SQL instances that have internal IP addresses. This eliminates the need for a public IP address or a public network connection to your database, which can increase security and regulatory compliance.
upvoted 1 times
mrvergara
1 year, 8 months ago
Option A, configuring a Cloud SQL connection, is not possible because Cloud Run does not support direct connections to Cloud SQL instances. Option C, using the Cloud SQL Java connector, is a valid way to connect to a Cloud SQL instance but does not provide the secure and scalable VPC connectivity that is recommended by Google. Option D, connecting to an instance of the Cloud SQL Auth proxy, is a valid way to connect to a Cloud SQL instance, but it requires additional setup and maintenance, and may not be the most secure or scalable option, especially for large-scale deployments.
upvoted 1 times
...
...
TNT87
1 year, 9 months ago
Selected Answer: C
https://cloud.google.com/sql/docs/mysql/connect-connectors#setup-and-usage If your application is written in Java you can skip this step, since you do this in the Java Cloud SQL Connector
upvoted 1 times
mrvergara
1 year, 8 months ago
https://cloud.google.com/sql/docs/mysql/connect-run#vpc-access In this documentation, Google recommends using a Serverless VPC Access connector to connect to the internal IP address of a Cloud SQL instance, which is a secure and scalable way to access resources in a VPC network.
upvoted 2 times
mrvergara
1 year, 8 months ago
Option C, "Configure your application to use the Cloud SQL Java connector," is a valid option, but it is not recommended by Google as the best practice. The Cloud SQL Java connector is designed to work with external IP addresses, and using it with an internal IP address can result in increased latency and potential security vulnerabilities. Using a Serverless VPC Access connector to connect to the internal IP address, as suggested by option B, provides a more secure and performant solution. This method allows you to access the internal IP address of your Cloud SQL instance from a private network, bypassing the public internet, and avoiding exposure to security threats.
upvoted 3 times
mathieu89
1 year, 8 months ago
According doc tnt87 sent - SQL connectors can't provide a network path to a Cloud SQL instance if one is not already present.
upvoted 1 times
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago