Google ACE Deploying and Implementing a Cloud Solution Practice Question
A team is using Terraform to manage infrastructure. They want to store the Terraform state file remotely in a GCS bucket for team collaboration. Which Terraform backend configuration is correct?
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
✓
terraform { backend "gcs" { bucket = "my-terraform-state" } }
Both options A and B are valid Terraform backend configurations for GCS. Option A uses the minimal required argument 'bucket'. Option B adds the optional 'prefix' argument to organize state files within the bucket. The 'gcs' backend supports both. Options C and D are invalid because 'storage' and 'gcloud' are not valid backend types.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
terraform { backend "gcs" { bucket = "my-terraform-state" } }
Why this is correct
Correct. The 'gcs' backend requires a 'bucket' argument. This configuration will store the state file in the root of the bucket.
- ✓
terraform { backend "gcs" { bucket = "my-terraform-state" prefix = "terraform/state" } }
Why this is correct
Correct. The 'prefix' argument is optional and allows you to organize state files under a specific path within the bucket.
- ✗
terraform { backend "storage" { bucket = "my-terraform-state" } }
Why it's wrong here
Incorrect. 'storage' is not a valid Terraform backend type for GCS. The correct backend type is 'gcs'.
- ✗
terraform { backend "gcloud" { bucket = "my-terraform-state" } }
Why it's wrong here
Incorrect. 'gcloud' is not a valid Terraform backend type. The correct backend type is 'gcs'.
Go deeper
Related to this question
About these practice questions
One of 775 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.