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 automating the provisioning of Cloud SQL for PostgreSQL instances across multiple application projects using Terraform inside a Cloud Build CI/CD pipeline. To satisfy strict security and compliance policies, the workflow must meet the following requirements:
roles/cloudkms.cryptoKeyEncrypterDecrypter access without manual intervention.Which configuration should you implement?
roles/cloudkms.autokeyAdmin) role, and use Terraform to create a google_project_service_identity resource for sqladmin.googleapis.com and attach a multi-regional Cloud KMS key.roles/cloudkms.autokeyAdmin and Multi-Regional Keys DoThe Cloud KMS Autokey Admin (roles/cloudkms.autokeyAdmin) role is an elevated administrative role designed to enable and configure Autokey at the folder or project level—such as linking a central key project. Meanwhile, multi-regional keys in Cloud KMS replicate key material across multiple geographic regions for services that operate across wide areas.
roles/cloudkms.autokeyUser to request keys via KeyHandle resources. Assigning roles/cloudkms.autokeyAdmin violates least privilege and separation of duties by giving the deployment pipeline control over Autokey configuration.You were building a separate platform-administration pipeline solely responsible for enabling Cloud KMS Autokey across folders and were deploying a service that supports multi-regional keys rather than Cloud SQL.
roles/cloudkms.autokeyUser) roles, and have Terraform create a KeyHandle resource before provisioning the Cloud SQL instance.This approach combines a dedicated user-managed service account for Cloud Build with Cloud KMS Autokey to securely automate database provisioning. Instead of giving a CI/CD pipeline broad administrative powers over encryption keys and IAM policies, the pipeline uses the low-privilege Cloud KMS Autokey User (roles/cloudkms.autokeyUser) role to request encryption keys on demand via a KeyHandle resource.
roles/cloudsql.admin)—rather than sharing broad project-wide permissions with other builds.roles/cloudkms.autokeyUser, the Terraform pipeline never receives roles/cloudkms.admin or IAM policy-editing roles. If the CI/CD pipeline is compromised, attackers cannot alter key policies or destroy existing encryption keys.KeyHandle resource, the Google-managed Cloud KMS service agent automatically provisions a compliant regional key and grants roles/cloudkms.cryptoKeyEncrypterDecrypter to the Cloud SQL service agent behind the scenes.Traditional Terraform pipelines require elevated key-management and security-admin permissions to create keys and bind service agent roles. Delegating key creation to Cloud KMS Autokey while scoping Cloud Build to a user-managed service account satisfies enterprise security guardrails without slowing down automated database delivery.
roles/cloudkms.cryptoKeyEncrypterDecrypter) role, and rely on Cloud Build's built-in ephemeral CMEK encryption to protect the provisioned Cloud SQL instance.Cloud Build automatically encrypts its own temporary build-time persistent disks using a unique, ephemeral 256-bit encryption key generated for each build. This built-in feature ensures CMEK compliance for the build workspace itself without manual setup, wiping and destroying the key from memory as soon as the build completes.
roles/cloudkms.cryptoKeyEncrypterDecrypter to the Cloud Build service account does not allow Terraform to create or request CMEKs, nor does it authorize the Cloud SQL service agent to use a key for database storage encryption.roles/cloudkms.cryptoKeyEncrypterDecrypter should be granted exclusively to the managed service agent (such as the Cloud SQL service agent), not to human users or CI/CD pipeline service accounts.The question asked how Cloud Build protects temporary workspace data on its own build-time persistent disks during a CI/CD run rather than how to provision a CMEK-encrypted Cloud SQL database.
roles/cloudkms.admin) and Cloud SQL Admin roles so Terraform can create the Cloud KMS key, grant roles/cloudkms.cryptoKeyEncrypterDecrypter to the Cloud SQL service identity, and provision the instance.This option relies on the default Cloud Build service account and grants it elevated Cloud KMS Admin (roles/cloudkms.admin) permissions alongside Cloud SQL Admin (roles/cloudsql.admin). In this traditional Infrastructure as Code pattern, Terraform directly creates the Cloud KMS key ring and key, explicitly modifies IAM policies on the key to grant roles/cloudkms.cryptoKeyEncrypterDecrypter to the Cloud SQL service identity, and then provisions the database.
roles/cloudkms.admin to an automated deployment pipeline gives the pipeline full control over key lifecycles and IAM policies. If the pipeline or source repository is compromised, an attacker gains administrative control over the encryption key management plane.roles/cloudkms.admin can disable, schedule destruction for, or alter access policies on cryptographic keys.Your organization did not use Cloud KMS Autokey, accepted managing elevated key-administration privileges within a strictly isolated platform-admin pipeline, and did not have a requirement to avoid the default Cloud Build service account.
Even when automating legacy workflows without Cloud KMS Autokey, security best practices recommend replacing the default Cloud Build service account with a dedicated user-managed service account and separating key-creation pipelines from database-provisioning pipelines.
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