Question

Difficulty: MediumDeploying and Configuring Managed Database Instances

A cloud engineer is deploying a Cloud SQL for PostgreSQL instance named 'orders-db' in a custom VPC network named 'production-vpc'. To meet security and operational compliance, the database instance must accept traffic exclusively via Private IP, enforce SSL/TLS encryption for all incoming client connections, and automatically increase storage capacity when available disk space is low. Which gcloud command correctly provisions this managed database instance?

  1. gcloud sql instances create orders-db --database-version=POSTGRES_15 --network=production-vpc --no-assign-ip --ssl-mode=ENCRYPTED_ONLY --enable-auto-increaseAnswer
  2. B
    gcloud sql instances create orders-db --database-version=POSTGRES_15 --assign-ip --authorized-networks=0.0.0.0/0 --ssl-mode=ENCRYPTED_ONLY --enable-auto-increase
  3. C
    gcloud sql instances create orders-db --database-version=POSTGRES_15 --network=production-vpc --no-assign-ip --require-ssl --auto-increase-storage
  4. D
    gcloud compute instances create orders-db-vm --zone=us-central1-a --machine-type=e2-standard-4 --image-family=debian-11

Answer

The command 'gcloud sql instances create orders-db --database-version=POSTGRES_15 --network=production-vpc --no-assign-ip --ssl-mode=ENCRYPTED_ONLY --enable-auto-increase' correctly satisfies all requirements.
The correct choice utilizes valid gcloud CLI flags for Cloud SQL deployment: '--no-assign-ip' removes public IP exposure, '--network=production-vpc' attaches the instance to Private Service Access, '--ssl-mode=ENCRYPTED_ONLY' requires SSL/TLS client connections, and '--enable-auto-increase' turns on automatic disk size expansion.

Step-by-Step Solution

1
Identify Private IP provisioning requirements for Cloud SQL
Using '--no-assign-ip' disables public IP allocation, while '--network=production-vpc' binds the instance to Private Service Access inside the custom VPC.
Ensures network connectivity remains internal and secure within Google Cloud.
2
Identify SSL/TLS enforcement and auto-scaling flags
'--ssl-mode=ENCRYPTED_ONLY' enforces encrypted connections, and '--enable-auto-increase' enables automatic storage expansion.
Fulfills compliance requirements for encrypted data transit and operational reliability.

Key Concept

Deploying Cloud SQL instances with Private IP, SSL enforcement, and storage auto-increase via gcloud CLI
Rate this question