hardMultiple ChoiceObjective-mapped
Google ACE Practice Question: A DevOps team uses Terraform to manage GCP…
A DevOps team uses Terraform to manage GCP infrastructure and wants to store Terraform state in a shared location that all team members can access securely, with state locking to prevent concurrent modifications. Which backend configuration achieves this?
⚠ Common exam trap
A common mix-up: candidates confuse the `gcp` provider (which manages GCP resources) with a backend name, or assume that any shared filesystem (like Cloud Filestore) can provide locking, ignoring that Terraform requires atomic, server-side locking which only object storage backends like `gcs` or `s3` provide natively.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gcs backend storing state in a Cloud Storage bucket
The `gcs` backend is the correct choice because it stores Terraform state in a Google Cloud Storage bucket, which provides secure, shared access via IAM policies and supports state locking natively through object versioning and write-preconditions. This ensures that only one team member can modify the state at a time, preventing conflicts and corruption.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
gcs backend storing state in a Cloud Storage bucket
Why this is correct
The `gcs` backend is the official Google Cloud Terraform backend: it stores the state file in a Cloud Storage bucket and supports state locking through the coordinated creation of a lock object using GCS object generation and precondition checks. This lock is released after the operation, preventing concurrent runs from corrupting state. It also supports bucket versioning to retain history and can use customer-managed encryption keys (CMEK) for at-rest protection, making it the correct choice for team collaboration.
- ✗
gcp backend storing state in a BigQuery table
Why it's wrong here
Terraform has no native `gcp` backend, nor does it support BigQuery as a state storage location; BigQuery is a petabyte-scale data warehouse, not a file system with atomic read-modify-write semantics. A backend named `gcp` would be invalid and Terraform would reject it at initialization. BigQuery lacks the locking and consistency guarantees required for safe state manipulation, so this option is incorrect.
- ✗
remote backend connected to a Cloud SQL database
Why it's wrong here
The `remote` backend in Terraform is exclusively used to connect to Terraform Cloud or Terraform Enterprise via their API; it is not a generic SQL client. Cloud SQL is a fully managed relational database, but Terraform provides no backend that writes state to Cloud SQL or any other SQL database. Even if a database could hold the state, backend state handling requires HTTP-based or object-store primitives, not SQL connections, so this option is wrong.
- ✗
local backend with a path shared over Cloud Filestore
Why it's wrong here
A `local` backend writes the state file to a path on the local filesystem; even if that path is shared via Cloud Filestore, it is still the local backend. Terraform's local backend does not implement state locking, and NFS-based file locks over Filestore are unreliable across concurrent processes. Multiple team members running Terraform simultaneously would cause lost writes or state corruption, making this configuration unsafe despite the shared storage.
Go deeper
Related to this question
Learn chapter
Google Cloud Platform Overview
Key term
IAM
Identity and Access Management (IAM) is a framework of policies and technologies that ensures the right individuals have the appropriate access to technology resources.
Key term
Google Cloud
Google Cloud is a suite of cloud computing services offered by Google that provides infrastructure, platform, and software solutions over the internet.
About these practice questions
One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.