A digital publishing platform is setting up database infrastructure to support a globally distributed application. The architecture requires strong relational consistency across multi-region read/write deployments, horizontal scaling capabilities, and automated provision management through Terraform. In addition, the platform engineering team must ensure that automated CI/CD pipeline executions cannot cause concurrency conflicts or state file corruption. Which provisioning strategy should the cloud architect recommend to fulfill these requirements?
- Provision a Cloud Spanner instance to provide multi-region relational transactional consistency, and configure the Terraform remote backend using a Cloud Storage bucket with object versioning and state locking enabled.Answer
- BProvision a Cloud SQL for PostgreSQL instance with cross-region read replicas to support multi-region write workloads, and store the Terraform state file in a local repository attached to the CI/CD execution runner.
- CProvision a Cloud Spanner instance to support multi-region relational consistency, and store the Terraform state in an unversioned Cloud Storage bucket without state locking to maximize pipeline throughput.
- DProvision a Cloud Spanner instance using raw Customer-Supplied Encryption Keys (CSEK) embedded directly in Terraform input variable files, and persist the state file on an ephemeral disk attached to the build agent.
Answer
Provision a Cloud Spanner instance to provide multi-region relational transactional consistency, and configure the Terraform remote backend using a Cloud Storage bucket with object versioning and state locking enabled.
The correct strategy combines Cloud Spanner for globally consistent multi-region relational database operations with a Cloud Storage Terraform remote backend configured with object versioning and state locking. This satisfies both the database consistency demands and the IaC pipeline safety requirements.
Step-by-Step Solution
Key Concept
Provisioning scalable relational databases and secure Terraform state backends