An enterprise financial organization is deploying a globally distributed relational database using Cloud Spanner to process cross-border transactions. Security compliance mandates that all database storage must be encrypted using Customer-Managed Encryption Keys (CMEK) managed in a dedicated central security project, and the database schema must be initialized prior to attaching automated backup policies. In what sequential order should the cloud engineering team execute the provisioning and configuration workflow?
- 1Grant the Cloud Spanner Service Agent in the application project the Cloud KMS CryptoKey Encrypter/Decrypter IAM role on the designated KMS key in the security project.
- 2Provision the multi-region Cloud Spanner instance specifying the target instance configuration and compute capacity.
- 3Create the Cloud Spanner database within the instance, passing the Cloud KMS CryptoKey resource identifier during initialization.
- 4Execute Data Definition Language (DDL) statements against the database to create relational tables, secondary indexes, and database roles.
- 5Configure the automated Cloud Spanner database backup schedule and Point-in-Time Recovery (PITR) retention policy.
Answer
The correct operational sequence begins by granting the Cloud Spanner Service Agent the Cloud KMS CryptoKey Encrypter/Decrypter IAM role on the central KMS key. Next, provision the multi-region Cloud Spanner instance. Follow this by creating the Cloud Spanner database while specifying the CMEK key URI. Then, execute DDL statements to populate tables and schema definitions. Finally, establish the automated database backup schedule and Point-in-Time Recovery policy.
The correct workflow adheres to cloud security dependency management and resource hierarchy principles. First, pre-requisite IAM permissions must be granted to the Cloud Spanner Service Agent on the Cloud KMS key in the security project. Second, the parent Cloud Spanner instance must be provisioned. Third, the Cloud Spanner database is created while passing the CMEK key URI so that initial storage allocation is encrypted with the custom key. Fourth, DDL statements are executed against the running database to establish tables and indexes. Fifth, automated backup schedules and PITR retention policies are configured to protect the initialized schema and incoming data.
Step-by-Step Solution
Key Concept
Cloud Spanner Provisioning and CMEK Integration Workflow