A company wants to restrict network access to Cloud SQL instances such that only applications running in a specific VPC can connect. Which GCP feature should they use?
Trap 1: Private Service Connect
Private Service Connect is used for exposing services to consumers via Network Endpoint Groups, not for connecting to Cloud SQL. The correct feature for consuming Cloud SQL privately is Private Service Access.
Trap 2: VPC peering
VPC peering connects two VPCs, but Cloud SQL is not a VPC; it's a managed service. Private Service Access uses VPC peering with the Cloud SQL's tenant VPC, but the feature itself is named Private Service Access.
Trap 3: Private Services Access
Private Services Access is not a real GCP feature. The correct term is Private Service Access.
- A
Private Service Connect
Why wrong: Private Service Connect is used for exposing services to consumers via Network Endpoint Groups, not for connecting to Cloud SQL. The correct feature for consuming Cloud SQL privately is Private Service Access.
- B
Private Service Access
Private Service Access enables private connectivity to Google-managed services such as Cloud SQL from a VPC using private IP addresses. This is the recommended approach.
- C
VPC peering
Why wrong: VPC peering connects two VPCs, but Cloud SQL is not a VPC; it's a managed service. Private Service Access uses VPC peering with the Cloud SQL's tenant VPC, but the feature itself is named Private Service Access.
- D
Private Services Access
Why wrong: Private Services Access is not a real GCP feature. The correct term is Private Service Access.