Question

Difficulty: MediumProvisioning Storage and Database Systems

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?

  1. 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
  2. B
    Provision 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.
  3. C
    Provision 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.
  4. D
    Provision 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

1
Analyze database requirements
Identified the need for multi-region relational consistency and horizontal scaling, pointing to Cloud Spanner rather than Cloud SQL.
Cloud SQL is limited to single-region write workloads, whereas Cloud Spanner provides globally distributed, strongly consistent relational transactions.
2
Analyze Infrastructure as Code (IaC) provisioning requirements
Determined that automated pipeline runs require remote state management with locking and versioning.
Cloud Storage backends support native state locking and object versioning, ensuring state files are protected against concurrent modifications and accidental corruption.

Key Concept

Provisioning scalable relational databases and secure Terraform state backends
Rate this question