A cloud engineer needs to configure Private Service Access and deploy a Cloud SQL PostgreSQL database instance with Private IP connectivity in a custom Virtual Private Cloud (VPC) network using the `gcloud` command-line interface. Sequence the required steps in the correct chronological order from first to last.
- 1Allocate an internal IP address range in the target VPC network using `gcloud compute addresses create`.
- 2Establish a private connection between the VPC network and Google services using `gcloud services peered-connect-services create`.
- 3Provision the Cloud SQL PostgreSQL instance using `gcloud sql instances create` with `--network` and `--no-assign-ip` flags.
- 4Create an initial database user account on the Cloud SQL instance using `gcloud sql users create`.
Answer
The correct sequence of steps is: 1) Allocate an internal IP address range in the VPC network, 2) Establish a private connection (VPC Network Peering) to Google services, 3) Provision the Cloud SQL PostgreSQL instance with `--network` and `--no-assign-ip`, and 4) Create an initial database user account on the instance.
To provision a Cloud SQL database instance exclusively on Private IP, Google Cloud requires establishing Private Service Access beforehand. The deployment workflow strictly requires: first reserving an internal IP block in the target VPC, second creating the VPC network peering connection to servicenetworking.googleapis.com, third executing `gcloud sql instances create` with `--network` and `--no-assign-ip`, and finally managing database resources such as creating initial database users.
Step-by-Step Solution
Key Concept
Provisioning Cloud SQL Private IP via Private Service Access