Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team is writing a gcloud automation script to provision a new production Cloud SQL for PostgreSQL 16 instance in an empty Google Cloud project. The database must meet the following requirements:
us-central1-a and us-central1-b.prod-vpc network using private services access.Which automation workflow should your script implement?
VPC_PEERING IP range, and run gcloud services vpc-peerings connect. Then run gcloud sql instances create with --database-version=POSTGRES_16, --edition=ENTERPRISE, --cpu=4, --memory=32768MB, --enable-data-cache, --storage-type=SSD, --storage-size=100, --storage-auto-increase-limit=500, --availability-type=REGIONAL, --zone=us-central1-a, --secondary-zone=us-central1-b, --network=prod-vpc, and --no-assign-ip.This option properly establishes private services access and regional HA zone placement, but it attempts to provision a 4-vCPU, 32-GB custom instance under Cloud SQL Enterprise edition (--edition=ENTERPRISE), enables --enable-data-cache, and passes --storage-auto-increase-limit=500 without enabling --storage-auto-increase.
--memory=32768MB (32 GB) is rejected.--enable-data-cache) is a Cloud SQL Enterprise Plus edition feature and is not available on standard Enterprise edition instances.--storage-auto-increase-limit=500 without --storage-auto-increase does not enable automatic storage growth, leaving the instance capped at its initial 100 GB disk.db-perf-optimized-N-4 (4 vCPUs, 32 GB memory, 375 GB data cache) provide higher memory-to-vCPU ratios and local SSD caching.--storage-auto-increase can cause the instance to run out of space, go offline, and lose Cloud SQL SLA coverage.--cpu and --memory flags apply to Enterprise edition dedicated-core instances, where memory must be a multiple of 256 MB within 0.9–6.5 GB per vCPU.The workload required a standard Enterprise edition instance with 4 vCPUs and 16 GB of memory (16384MB), did not require data cache, and explicitly included --storage-auto-increase.
VPC_PEERING IP range, and run gcloud services vpc-peerings connect. Then run gcloud sql instances create with --database-version=POSTGRES_16, --edition=ENTERPRISE_PLUS, --tier=db-perf-optimized-N-4, --enable-data-cache, --storage-type=SSD, --storage-size=100, --storage-auto-increase, --storage-auto-increase-limit=500, --availability-type=REGIONAL, --secondary-zone=us-central1-b, --network=prod-vpc, and --no-assign-ip.This workflow properly sets up VPC Network Peering, selects the Enterprise Plus performance-optimized tier with data cache, and configures bounded SSD storage autoscaling. However, when configuring regional high availability, it passes --secondary-zone=us-central1-b while omitting the required primary --zone flag.
--secondary-zone is specified during instance creation or editing, the primary --zone parameter must also be explicitly specified.--zone=us-central1-a, the command either fails validation or cannot guarantee that the primary instance is placed specifically in us-central1-a alongside the standby in us-central1-b.--zone and --secondary-zone (only specifying --region and --availability-type=REGIONAL).The command included --zone=us-central1-a alongside --secondary-zone=us-central1-b, or if the workload had no requirement to pin specific zones and omitted --secondary-zone altogether.
Explicitly pinning --zone and --secondary-zone in automation scripts is useful when co-locating the primary database with Compute Engine or GKE workloads in the same zone to minimize network latency.
sqladmin.googleapis.com and compute.googleapis.com, allocate a VPC_PEERING IP range in prod-vpc, and immediately run gcloud sql instances create with --database-version=POSTGRES_16, --edition=ENTERPRISE_PLUS, --tier=db-perf-optimized-N-4, --enable-data-cache, --storage-type=SSD, --storage-size=100, --storage-auto-increase, --storage-auto-increase-limit=500, --availability-type=REGIONAL, --zone=us-central1-a, --secondary-zone=us-central1-b, --network=prod-vpc, and --no-assign-ip.This option correctly specifies the compute tier, storage autoscaling, and regional high availability flags for Cloud SQL, and it reserves an internal IP address range with --purpose=VPC_PEERING. However, it skips enabling the Service Networking API (servicenetworking.googleapis.com) and never establishes the VPC Network Peering connection before attempting to create the database instance.
servicenetworking.googleapis.com is not enabled and gcloud services vpc-peerings connect was not executed, the gcloud sql instances create command will fail with SERVICE_NETWORKING_NOT_ENABLED or NETWORK_NOT_PEERED.servicenetworking.googleapis.com, reserving a VPC_PEERING CIDR block via gcloud compute addresses create, and linking them via gcloud services vpc-peerings connect.prod-vpc when --network is passed.--no-assign-ip disables public IP allocation, the instance cannot fall back to a public interface when private services access is missing.The prod-vpc network in that project already had servicenetworking.googleapis.com enabled and an active VPC Network Peering connection configured with sufficient available IP addresses.
In automated pipelines targeting greenfield projects, always place API activation and gcloud services vpc-peerings connect before database creation steps so private IP allocation succeeds reliably.
sqladmin.googleapis.com, compute.googleapis.com, and servicenetworking.googleapis.com, allocate a VPC_PEERING IP range, and run gcloud services vpc-peerings connect. Then run gcloud sql instances create with --database-version=POSTGRES_16, --edition=ENTERPRISE_PLUS, --tier=db-perf-optimized-N-4, --enable-data-cache, --storage-type=SSD, --storage-size=100, --storage-auto-increase, --storage-auto-increase-limit=500, --availability-type=REGIONAL, --zone=us-central1-a, --secondary-zone=us-central1-b, --network=prod-vpc, and --no-assign-ip.This workflow executes the required VPC Network Peering prerequisites for private services access in a new project and then provisions a Cloud SQL for PostgreSQL 16 instance using the exact gcloud flags needed for Enterprise Plus compute, bounded storage autoscaling, regional high availability, and private-only networking.
--edition=ENTERPRISE_PLUS with --tier=db-perf-optimized-N-4 provisions a performance-optimized N2 machine type with 4 vCPUs, 32 GB of memory, and 375 GB of local SSD data cache enabled via --enable-data-cache.--storage-type=SSD and --storage-size=100 establishes the initial 100 GB SSD disk, while --storage-auto-increase and --storage-auto-increase-limit=500 allow Cloud SQL to automatically expand storage when free space runs low without exceeding 500 GB.--availability-type=REGIONAL alongside both --zone=us-central1-a and --secondary-zone=us-central1-b places the primary and standby instances in distinct zones within the same region.servicenetworking.googleapis.com, reserving a global VPC_PEERING address range, and running gcloud services vpc-peerings connect establishes private services access on prod-vpc. Passing --network=prod-vpc and --no-assign-ip ensures the instance receives only a private IPv4 address.SERVICE_NETWORKING_NOT_ENABLED and NETWORK_NOT_PEERED errors during automated runs.Every dependency—from network peering in an empty project to explicit primary/secondary zone placement and Enterprise Plus machine sizing—is satisfied in the proper execution order without manual intervention.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated