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 database engineering team provisions and manages Cloud SQL and Spanner instances across development, staging, and production environments using Terraform modules such as sql-db and cloud-spanner. To standardize database infrastructure management across the organization, your solution must meet these requirements:
terraform plan runs whenever engineers commit changes to the version control system (VCS) repository.Which approach should you implement?
google_sql_provision_script Terraform resource to define, version, and manage the lifecycle of both Cloud SQL and Spanner instancesgoogle_sql_provision_script isThe google_sql_provision_script resource in the Google Terraform provider uses the Cloud SQL Data API to execute SQL scripts directly against an existing Cloud SQL instance. It is designed to create in-database objects—such as databases, tables, extensions, users, and privilege grants—without requiring a manual client connection.
google_sql_provision_script only runs SQL statements inside an already provisioned Cloud SQL instance; it cannot provision or manage Cloud SQL instances (sql-db / google_sql_database_instance) or Spanner instances (cloud-spanner).google_sql_provision_script resource from Terraform configuration does not automatically delete the in-database objects it created unless explicit DROP ... IF EXISTS statements are written and applied..tf code, it does not provide a remote execution environment, encrypted state backend, or VCS-triggered terraform plan automation.The requirement were strictly to automate creating schemas, tables, or database users inside an existing Cloud SQL instance during Terraform runs without establishing direct network connectivity to the database port.
Terraform Cloud is a managed Software as a Service (SaaS) platform that provides a collaborative, remote execution environment for running Terraform workflows. For database engineering teams managing Cloud SQL and Spanner resources, it centralizes state management, secret storage, and automated plan execution.
terraform plan, giving database engineers immediate feedback on proposed instance changes before applying them.sql-db and cloud-spanner across dev, staging, and production workspaces.Unlike local CLI execution or manual workflows, Terraform Cloud combines remote state management, secret protection, and VCS-driven automation in a single platform purpose-built for organization-wide Infrastructure as Code governance.
Running Terraform in Cloud Shell involves creating a root module directory with .tf configuration files (such as main.tf) and executing terraform init, terraform plan, and terraform apply manually from an individual user's browser-based shell.
terraform plan when commits are pushed to Git, bypassing formal change management and peer review.You were a single engineer completing a quick prototype or tutorial to test a standalone Cloud SQL database in a sandbox project without team collaboration or CI/CD requirements.
Even when starting in Cloud Shell, production teams should transition configurations into a shared Git repository and store Terraform state remotely—such as in Terraform Cloud or a Cloud Storage bucket with remote execution.
Google Cloud Deployment Manager is an infrastructure deployment service that uses declarative templates to provision Google Cloud resources and manage project setups. While it supports version-controlled templates and CI/CD integration, it operates differently from Terraform and follows specific operational constraints.
sql-db or cloud-spanner, nor does it provide remote Terraform state management or terraform plan triggers.The team were using Deployment Manager specifically to provision initial, long-lived stateful project and network foundations outside of CI/CD while only creating and deleting temporary stateless application resources inside the pipeline.
When adopting Infrastructure as Code (IaC) for databases, separate long-lived stateful infrastructure from ephemeral test workloads so pipelines remain fast, predictable, and within organizational quotas.
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