A system administrator is deploying a managed Cloud SQL instance for an enterprise application. The security policy dictates that the database must communicate strictly within a custom Virtual Private Cloud (VPC) network named 'corp-vpc' and must not have a public IP address. Which TWO actions must be completed to deploy the Cloud SQL instance with private IP connectivity and no public IP?
- Create a private services access connection by allocating an IP address range and peering 'corp-vpc' with the Google services network.Cevap
- Include the '--network=corp-vpc' and '--no-assign-ip' flags when executing the 'gcloud sql instances create' command.Cevap
- CPass the '--authorized-networks=0.0.0.0/0' flag in the 'gcloud sql instances create' command to restrict access to internal VPC subnets.
- DUse the '--private-ip-only' flag and set '--zone=all' when executing the 'gcloud sql instances create' command.
Cevap
The correct configuration requires establishing a private services access connection between 'corp-vpc' and Google services, and deploying the instance using the 'gcloud sql instances create' command with the '--network=corp-vpc' and '--no-assign-ip' flags.
Deploying a Cloud SQL instance with private IP connectivity requires establishing Private Service Access by peering the custom VPC with Google services, and running the deployment command with '--network' set to the VPC name alongside '--no-assign-ip' to prevent public IP creation.
Adım Adım Çözüm
Anahtar Kavram
Provisioning Cloud SQL instances with Private IP and disabling Public IP via gcloud CLI and Private Service Access
Tahmini Süre:1m 30s