You are creating a new application and require access to Cloud SQL from VPC instances without public IP addresses. Which two actions should you take? (Choose two.)
A.
Activate the Service Networking API in your project.
B.
Activate the Cloud Datastore API in your project.
C.
Create a private connection to a service producer.
D.
Create a custom static route to allow the traffic to reach the Cloud SQL API.
Answer are A & C
C is definitely correct. private services access require private connection
In below links stated Service Networking API is required
https://cloud.google.com/service-infrastructure/docs/enabling-private-services-access
A & C
https://cloud.google.com/sql/docs/mysql/private-ip
This page provides information about using private IP with Cloud SQL. For step-by-step instructions for configuring a Cloud SQL instance to use private IP, see Configuring private IP.
Correct Answer are (C) & (E):
C: If you are using private IP for any of your Cloud SQL instances, you only need to configure private services access one time for every Google Cloud project that has or needs to connect to a Cloud SQL instance.
If your Google Cloud project has a Cloud SQL instance, you can either configure it yourself or let Cloud SQL do it for you to use private IP.
Cloud SQL configures private services access for you when all the conditions below are true:
https://cloud.google.com/sql/docs/postgres/configure-private-services-access#before_you_begin
E:
You can enable Private Google access on a subnet level and any VMs on that subnet can access Google APIs by using their internal IP address.
https://cloud.google.com/vpc/docs/configure-private-google-access
A and C are the right options
A: Activating the Service Networking API is essential for setting up private services like Cloud SQL within your VPC. This API will allow the creation of a private IP address for Cloud SQL, ensuring that your VPC instances can communicate with Cloud SQL privately.
C: Creating a private connection to a service producer (Cloud SQL in this case) ensures that you establish a direct, private network connection to Cloud SQL. This connection allows VPC instances to interact with Cloud SQL without using public IPs.
It difficult to understand why. in my opinion should be OLNY E or A and C both.
Enabling Private Google Access allows VM instances without public IPs to access Google APIs and services. While useful, it's not strictly necessary for Cloud SQL private connectivity if you already have the Service Networking API and private connection configured. However, enabling this can provide additional benefits for accessing other Google services.
Answer should be A&C.
There are different ways to consume and provide APIs and services in GCP:
https://cloud.google.com/vpc/docs/private-access-options#connect-google-apis
--- Private service connect
--- Private Google access
--- Private services access
Among all the given options, only A/C(Private services access) and E(Private Google access) are reasonable. As the answers have to be two, so they can only be A and C. Also, Private Google access is enabled on subnet level, not on VPC level.
*For Private services access, its deployment involves the allocation of a specific internal CIDR in the local VPC and creation of a private connection between local VPC and service provider's VPC. This private connection is created using Service Networking API.
https://cloud.google.com/vpc/docs/private-services-access
*For Private Google access, it applies for accessing the external ip of Google APIs and services from instances with only internal ip addresses
https://cloud.google.com/vpc/docs/private-google-access
I think the answer is A and C
To use private service access, enabling Service Networking API is required on the project as per https://cloud.google.com/service-infrastructure/docs/enabling-private-services-access
and it's required to create a private connection after enabling above API.
https://cloud.google.com/sql/docs/mysql/private-ip#application_environment_requirements
Please refer https://cloud.google.com/sql/docs/mysql/private-ip#requirements_for_private_ip
It clearly says creating Configuring a Cloud SQL instance and acces is privately we need private services access and Service Networking API must be enabled hence A and C is correct
a service
To access Cloud SQL from VPC instances without public IP addresses, you need to enable Private Google Access on the subnet where the instances are located. Private Google Access allows VMs without public IP addresses to reach Google APIs and services such as Cloud SQL using internal IP addresses.
In addition, you need to activate the Service Networking API in your project. This enables you to create a private connection to Cloud SQL using VPC Service Controls. With VPC Service Controls, you can create a private connection between your VPC network and Cloud SQL without requiring an external IP address.
Option B is incorrect because Cloud Datastore is a NoSQL document database that is not related to Cloud SQL.
Option C is incorrect because creating a private connection to a service producer is not necessary to access Cloud SQL from VPC instances without public IP addresses.
Option D is also incorrect because creating a custom static route is not necessary to access Cloud SQL from VPC instances without public IP addresses.
You need to read about service producer network with private access.
https://cloud.google.com/vpc/docs/private-services-access#:~:text=Service%20producer%20network,-On%20the%20service&text=The%20service%20producer's%20network%20is,resources%20in%20your%20VPC%20network.
It's A&C here is the link that shows that:
https://cloud.google.com/sql/docs/mysql/configure-private-ip
You must enable the Service Networking API for your project.
Private services access
When you create a new VPC network in your project, you need to configure private services access to allocate an IP address range and create a private service connection. This allows resources in the VPC network to connect to Cloud SQL instances.
C is definitely correct. private services access require private connection In below links stated Service Networking API is required
Service Networking enables you to offer your managed services on internal IP addresses to service consumers. Service consumers use private services access to privately connect to your service.
The question is not mentioning the need of connecting to CloudSQL by its private ip, enabling Network Services API is mandatory for enabling Private Google Access, A&E are the ones.
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.
mlyu
Highly Voted 4 years, 5 months agoAlex_74
3 years, 8 months agoESP_SAP
Highly Voted 4 years, 6 months agoVivekMishraV
3 years, 12 months agosaraali
Most Recent 2 months, 2 weeks agonkastanas
9 months, 3 weeks agodesertlotus1211
1 year, 2 months agogonlafer
1 year, 2 months agobus_karan19
1 year, 6 months agoi_0_i
1 year, 8 months agogcpengineer
1 year, 8 months agodidek1986
1 year, 8 months agohyosung
1 year, 9 months agoPranavP96
2 years agoKomal697
2 years, 1 month agoKomal697
2 years, 1 month agodesertlotus1211
1 year, 11 months agogcpengineer
1 year, 8 months agofad3r
2 years, 1 month agopk349
2 years, 3 months agoorwell
2 years, 7 months agoorwell
2 years, 7 months agodesertlotus1211
2 years, 7 months agodesertlotus1211
1 year, 8 months ago